aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_iterator_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/operation_iterator_test.go')
-rw-r--r--bug/operation_iterator_test.go28
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