aboutsummaryrefslogtreecommitdiffstats
path: root/commands/comment_edit_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/comment_edit_test.go')
-rw-r--r--commands/comment_edit_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/commands/comment_edit_test.go b/commands/comment_edit_test.go
new file mode 100644
index 00000000..50c1850b
--- /dev/null
+++ b/commands/comment_edit_test.go
@@ -0,0 +1,21 @@
+package commands
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestCommentEdit(t *testing.T) {
+ const golden = "testdata/comment/edit"
+
+ env, bugID, commentID := newTestEnvAndBugWithComment(t)
+
+ opts := commentEditOptions{
+ message: "this is an altered bug comment",
+ }
+ require.NoError(t, runCommentEdit(env.env, opts, []string{commentID}))
+
+ require.NoError(t, runComment(env.env, []string{bugID}))
+ requireCommentsEqual(t, golden, env)
+}