aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_iterator_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-11-08 19:15:06 +0100
committerMichael Muré <batolettre@gmail.com>2021-02-14 12:17:44 +0100
commit7163b2283b4542a4d4abfe9a71963f122322bde7 (patch)
tree93a52a65c5ba1fd3e4112b2aa53c2c438bb5400c /bug/operation_iterator_test.go
parent5ae8a132772385c903a62de2ceec02a97f108a01 (diff)
downloadgit-bug-7163b2283b4542a4d4abfe9a71963f122322bde7.tar.gz
bug: Id from first operation data, not git + remove root link
Diffstat (limited to 'bug/operation_iterator_test.go')
-rw-r--r--bug/operation_iterator_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/bug/operation_iterator_test.go b/bug/operation_iterator_test.go
index e066ddd8..81d87a5f 100644
--- a/bug/operation_iterator_test.go
+++ b/bug/operation_iterator_test.go
@@ -25,10 +25,11 @@ func ExampleOperationIterator() {
}
func TestOpIterator(t *testing.T) {
- mockRepo := repository.NewMockRepo()
+ repo := repository.NewMockRepo()
- rene := identity.NewIdentity("René Descartes", "rene@descartes.fr")
- err := rene.Commit(mockRepo)
+ rene, err := identity.NewIdentity(repo, "René Descartes", "rene@descartes.fr")
+ require.NoError(t, err)
+ err = rene.Commit(repo)
require.NoError(t, err)
unix := time.Now().Unix()
@@ -51,14 +52,14 @@ func TestOpIterator(t *testing.T) {
bug1.Append(addCommentOp)
bug1.Append(setStatusOp)
bug1.Append(labelChangeOp)
- err = bug1.Commit(mockRepo)
+ err = bug1.Commit(repo)
require.NoError(t, err)
// second pack
bug1.Append(genTitleOp())
bug1.Append(genTitleOp())
bug1.Append(genTitleOp())
- err = bug1.Commit(mockRepo)
+ err = bug1.Commit(repo)
require.NoError(t, err)
// staging