diff options
author | Michael Muré <batolettre@gmail.com> | 2019-11-19 00:28:06 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-11-19 00:28:06 +0100 |
commit | ed2ac793e9f353720db2615b06569d05c253b977 (patch) | |
tree | 9c5e06aa4e1ef9b41ceb21408de493d2e91b3d00 /bug/bug_test.go | |
parent | a9b32e6bdaa610e2244816618a316bcdf53545e6 (diff) | |
download | git-bug-ed2ac793e9f353720db2615b06569d05c253b977.tar.gz |
bug: use NeedCommit() in the interface, drop HasPendingOp()
Diffstat (limited to 'bug/bug_test.go')
-rw-r--r-- | bug/bug_test.go | 6 |
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) |