aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bug/bug_rm_test.go
blob: e0c2bbc579cd0eb44228c002fa73272d3e6169dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package bugcmd

import (
	"testing"

	"github.com/stretchr/testify/require"

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

func TestBugRm(t *testing.T) {
	env, bugID := testenv.NewTestEnvAndBug(t)

	exp := "bug " + bugID.Human() + " removed\n"

	require.NoError(t, runBugRm(env, []string{bugID.Human()}))
	require.Equal(t, exp, env.Out.String())
	env.Out.Reset()
}