1package bugcmd
2
3import (
4 "testing"
5
6 "github.com/stretchr/testify/require"
7
8 "github.com/MichaelMure/git-bug/commands/bug/testenv"
9)
10
11func TestBugCommentEdit(t *testing.T) {
12 const golden = "testdata/comment/edit"
13
14 env, bugID, commentID := testenv.NewTestEnvAndBugWithComment(t)
15
16 opts := bugCommentEditOptions{
17 message: "this is an altered bug comment",
18 }
19 require.NoError(t, runBugCommentEdit(env, opts, []string{commentID.Human()}))
20
21 require.NoError(t, runBugComment(env, []string{bugID.Human()}))
22 requireCommentsEqual(t, golden, env)
23}