diff options
author | Michael Muré <batolettre@gmail.com> | 2022-09-10 11:09:19 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-11-20 17:18:09 +0100 |
commit | acc9a6f3a6df2961c3ae44352216d915cb9b5315 (patch) | |
tree | e159372673104ade1f15ddc1a84aa9da93e93552 /commands/add_test.go | |
parent | a3fa445a9c76631c4cd16f93e1c1c68a954adef7 (diff) | |
download | git-bug-acc9a6f3a6df2961c3ae44352216d915cb9b5315.tar.gz git-bug-acc9a6f3a6df2961c3ae44352216d915cb9b5315.zip |
commands: reorg into different packages
Diffstat (limited to 'commands/add_test.go')
-rw-r--r-- | commands/add_test.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/commands/add_test.go b/commands/add_test.go deleted file mode 100644 index 077995a6..00000000 --- a/commands/add_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package commands - -import ( - "strings" - "testing" - - "github.com/stretchr/testify/require" -) - -func newTestEnvAndBug(t *testing.T) (*testEnv, string) { - t.Helper() - - testEnv, _ := newTestEnvAndUser(t) - opts := addOptions{ - title: "this is a bug title", - message: "this is a bug message", - messageFile: "", - nonInteractive: true, - } - - require.NoError(t, runAdd(testEnv.env, opts)) - require.Regexp(t, "^[0-9A-Fa-f]{7} created\n$", testEnv.out) - bugID := strings.Split(testEnv.out.String(), " ")[0] - testEnv.out.Reset() - - return testEnv, bugID -} - -func TestAdd(t *testing.T) { - _, bugID := newTestEnvAndBug(t) - require.Regexp(t, "^[0-9A-Fa-f]{7}$", bugID) -} |