aboutsummaryrefslogtreecommitdiffstats
path: root/commands/rm_test.go
diff options
context:
space:
mode:
authorSteve Moyer <smoyer1@selesy.com>2022-06-15 09:07:00 -0400
committerSteve Moyer <smoyer1@selesy.com>2022-06-15 09:07:00 -0400
commit0a9aaa94429172d14297f709ec2137cd3749cfea (patch)
tree8a5ed7f8168d3aadfb1b80a86f2d4bbe97bf2742 /commands/rm_test.go
parent941f5b3fc362be388dd3bd979799dd296daec243 (diff)
downloadgit-bug-0a9aaa94429172d14297f709ec2137cd3749cfea.tar.gz
refactor(778): test only command implementations
Diffstat (limited to 'commands/rm_test.go')
-rw-r--r--commands/rm_test.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/commands/rm_test.go b/commands/rm_test.go
index e8b53057..5d4e7cca 100644
--- a/commands/rm_test.go
+++ b/commands/rm_test.go
@@ -1,15 +1,17 @@
-package commands_test
+package commands
-import "testing"
+import (
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
func TestRm(t *testing.T) {
testEnv, _, bugID := newTestEnvUserAndBug(t)
- testEnv.cmd.SetArgs([]string{
- "rm",
- bugID,
- })
+ exp := "bug " + bugID + " removed\n"
- testEnv.Execute(t)
- // TODO: add assertions after #778 is diagnosed and fixed
+ require.NoError(t, runRm(testEnv.env, []string{bugID}))
+ require.Equal(t, exp, testEnv.out.String())
+ testEnv.out.Reset()
}