aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_iterator_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-10-04 20:45:42 +0200
committerGitHub <noreply@github.com>2020-10-04 20:45:42 +0200
commit68e2a72b2a3047d84aba44f22751fb13b34553c1 (patch)
tree6e1496a1a6603abbd473cc0060a5acebc763a68b /bug/operation_iterator_test.go
parentd56ce3d5d9f5ef74201a8ee7c25be4820d435b47 (diff)
parentca720f165cb286d4372ad48595e532a2423f2f07 (diff)
downloadgit-bug-68e2a72b2a3047d84aba44f22751fb13b34553c1.tar.gz
Merge pull request #455 from MichaelMure/bug-loading-fix
cache,bug,identity: structural change
Diffstat (limited to 'bug/operation_iterator_test.go')
-rw-r--r--bug/operation_iterator_test.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/bug/operation_iterator_test.go b/bug/operation_iterator_test.go
index fcc61d0f..5d245185 100644
--- a/bug/operation_iterator_test.go
+++ b/bug/operation_iterator_test.go
@@ -5,7 +5,7 @@ import (
"testing"
"time"
- "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
@@ -28,6 +28,9 @@ func TestOpIterator(t *testing.T) {
mockRepo := repository.NewMockRepoForTest()
rene := identity.NewIdentity("René Descartes", "rene@descartes.fr")
+ err := rene.Commit(mockRepo)
+ require.NoError(t, err)
+
unix := time.Now().Unix()
createOp := NewCreateOp(rene, unix, "title", "message", nil)
@@ -48,15 +51,15 @@ func TestOpIterator(t *testing.T) {
bug1.Append(addCommentOp)
bug1.Append(setStatusOp)
bug1.Append(labelChangeOp)
- err := bug1.Commit(mockRepo)
- assert.NoError(t, err)
+ err = bug1.Commit(mockRepo)
+ require.NoError(t, err)
// second pack
bug1.Append(genTitleOp())
bug1.Append(genTitleOp())
bug1.Append(genTitleOp())
err = bug1.Commit(mockRepo)
- assert.NoError(t, err)
+ require.NoError(t, err)
// staging
bug1.Append(genTitleOp())
@@ -71,5 +74,5 @@ func TestOpIterator(t *testing.T) {
counter++
}
- assert.Equal(t, 10, counter)
+ require.Equal(t, 10, counter)
}