mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-18 14:24:21 +03:00
24 lines
547 B
Go
24 lines
547 B
Go
package bugcmd
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/MichaelMure/git-bug/commands/bug/testenv"
|
|
)
|
|
|
|
func TestBugCommentEdit(t *testing.T) {
|
|
const golden = "testdata/comment/edit"
|
|
|
|
env, bugID, commentID := testenv.NewTestEnvAndBugWithComment(t)
|
|
|
|
opts := bugCommentEditOptions{
|
|
message: "this is an altered bug comment",
|
|
}
|
|
require.NoError(t, runBugCommentEdit(env, opts, []string{commentID.Human()}))
|
|
|
|
require.NoError(t, runBugComment(env, []string{bugID.Human()}))
|
|
requireCommentsEqual(t, golden, env)
|
|
}
|