aboutsummaryrefslogtreecommitdiffstats
path: root/bug/bug_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/bug_test.go')
-rw-r--r--bug/bug_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/bug/bug_test.go b/bug/bug_test.go
index 4e8a9440..35e8a395 100644
--- a/bug/bug_test.go
+++ b/bug/bug_test.go
@@ -78,8 +78,11 @@ func TestBugCommitLoad(t *testing.T) {
repo := repository.NewMockRepoForTest()
+ assert.True(t, bug1.NeedCommit())
+
err := bug1.Commit(repo)
assert.Nil(t, err)
+ assert.False(t, bug1.NeedCommit())
bug2, err := ReadLocalBug(repo, bug1.Id())
assert.NoError(t, err)
@@ -90,8 +93,11 @@ func TestBugCommitLoad(t *testing.T) {
bug1.Append(setTitleOp)
bug1.Append(addCommentOp)
+ assert.True(t, bug1.NeedCommit())
+
err = bug1.Commit(repo)
assert.Nil(t, err)
+ assert.False(t, bug1.NeedCommit())
bug3, err := ReadLocalBug(repo, bug1.Id())
assert.NoError(t, err)