aboutsummaryrefslogblamecommitdiffstats
path: root/commands/bug/bug_new_test.go
blob: 3a4a535fe40ccac47c5b6d47d33278f25b35aa32 (plain) (tree)
1
2
3
4
5
6
7
8






                                             
                                                         












                                                                         
package bugcmd

import (
	"testing"

	"github.com/stretchr/testify/require"

	"github.com/git-bug/git-bug/commands/bug/testenv"
)

func TestBugNew(t *testing.T) {
	env, _ := testenv.NewTestEnvAndUser(t)

	err := runBugNew(env, bugNewOptions{
		nonInteractive: true,
		message:        "message",
		title:          "title",
	})
	require.NoError(t, err)
	require.Regexp(t, "^[0-9A-Fa-f]{7} created\n$", env.Out.String())
}