From ed2ac793e9f353720db2615b06569d05c253b977 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 19 Nov 2019 00:28:06 +0100 Subject: bug: use NeedCommit() in the interface, drop HasPendingOp() --- bug/bug_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bug/bug_test.go') 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) -- cgit