comment_edit_test.go
 1package commands
 2
 3import (
 4	"testing"
 5
 6	"github.com/stretchr/testify/require"
 7)
 8
 9func TestCommentEdit(t *testing.T) {
10	const golden = "testdata/comment/edit"
11
12	env, bugID, commentID := newTestEnvAndBugWithComment(t)
13
14	opts := commentEditOptions{
15		message: "this is an altered bug comment",
16	}
17	require.NoError(t, runCommentEdit(env.env, opts, []string{commentID}))
18
19	require.NoError(t, runComment(env.env, []string{bugID}))
20	requireCommentsEqual(t, golden, env)
21}