diff options
author | Michael Muré <batolettre@gmail.com> | 2019-02-16 17:32:30 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:40:24 +0100 |
commit | d2483d83dd52365741f51eca106aa18c4e8d6420 (patch) | |
tree | b1265d1874005952febe8d469435827a4947ba7b /bug/operation_iterator_test.go | |
parent | cd7ed7ff9e3250c10e97fe16c934b5a6151527bb (diff) | |
download | git-bug-d2483d83dd52365741f51eca106aa18c4e8d6420.tar.gz |
identity: I can compile again !!
Diffstat (limited to 'bug/operation_iterator_test.go')
-rw-r--r-- | bug/operation_iterator_test.go | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/bug/operation_iterator_test.go b/bug/operation_iterator_test.go index a41120e2..2865d25d 100644 --- a/bug/operation_iterator_test.go +++ b/bug/operation_iterator_test.go @@ -10,14 +10,17 @@ import ( ) var ( - rene = identity.NewIdentity("René Descartes", "rene@descartes.fr") - unix = time.Now().Unix() - - createOp = NewCreateOp(rene, unix, "title", "message", nil) - setTitleOp = NewSetTitleOp(rene, unix, "title2", "title1") - addCommentOp = NewAddCommentOp(rene, unix, "message2", nil) - setStatusOp = NewSetStatusOp(rene, unix, ClosedStatus) - labelChangeOp = NewLabelChangeOperation(rene, unix, []Label{"added"}, []Label{"removed"}) +// Beware, don't those test data in multi-repo situation ! +// As an example, the Identity would be considered commited after a commit +// in one repo, +// rene = identity.NewIdentity("René Descartes", "rene@descartes.fr") +// unix = time.Now().Unix() + +// createOp = NewCreateOp(rene, unix, "title", "message", nil) +// setTitleOp = NewSetTitleOp(rene, unix, "title2", "title1") +// addCommentOp = NewAddCommentOp(rene, unix, "message2", nil) +// setStatusOp = NewSetStatusOp(rene, unix, ClosedStatus) +// labelChangeOp = NewLabelChangeOperation(rene, unix, []Label{"added"}, []Label{"removed"}) ) func ExampleOperationIterator() { @@ -36,6 +39,15 @@ func ExampleOperationIterator() { func TestOpIterator(t *testing.T) { mockRepo := repository.NewMockRepoForTest() + rene := identity.NewIdentity("René Descartes", "rene@descartes.fr") + unix := time.Now().Unix() + + createOp := NewCreateOp(rene, unix, "title", "message", nil) + setTitleOp := NewSetTitleOp(rene, unix, "title2", "title1") + addCommentOp := NewAddCommentOp(rene, unix, "message2", nil) + setStatusOp := NewSetStatusOp(rene, unix, ClosedStatus) + labelChangeOp := NewLabelChangeOperation(rene, unix, []Label{"added"}, []Label{"removed"}) + bug1 := NewBug() // first pack |