diff options
Diffstat (limited to 'bug/operation_iterator_test.go')
-rw-r--r-- | bug/operation_iterator_test.go | 13 |
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() |