aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_iterator_test.go
diff options
context:
space:
mode:
authorMichael Muré <michael.mure@consensys.net>2019-02-01 12:22:00 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:40:22 +0100
commit56c6147eb6012252cf0b723b9eb6d1e841fc2f94 (patch)
treecce638adbf4a7d5b424fe9682cafc2fea5c64785 /bug/operation_iterator_test.go
parent14b240af8fef269d2c1d5dde2fff192b656c50f3 (diff)
downloadgit-bug-56c6147eb6012252cf0b723b9eb6d1e841fc2f94.tar.gz
identity: more refactoring progress
Diffstat (limited to 'bug/operation_iterator_test.go')
-rw-r--r--bug/operation_iterator_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/bug/operation_iterator_test.go b/bug/operation_iterator_test.go
index e1aa8911..a41120e2 100644
--- a/bug/operation_iterator_test.go
+++ b/bug/operation_iterator_test.go
@@ -20,6 +20,19 @@ var (
labelChangeOp = NewLabelChangeOperation(rene, unix, []Label{"added"}, []Label{"removed"})
)
+func ExampleOperationIterator() {
+ b := NewBug()
+
+ // add operations
+
+ it := NewOperationIterator(b)
+
+ for it.Next() {
+ // do something with each operations
+ _ = it.Value()
+ }
+}
+
func TestOpIterator(t *testing.T) {
mockRepo := repository.NewMockRepoForTest()