From 76ac1787b8de8698b878d1837c5fa8f6fe6403fc Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 17 Jul 2018 19:28:37 +0200 Subject: add bug status + open/close commands --- tests/bug_test.go | 6 +++--- tests/operation_iterator_test.go | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/bug_test.go b/tests/bug_test.go index a98cdc7f..175df1a8 100644 --- a/tests/bug_test.go +++ b/tests/bug_test.go @@ -29,19 +29,19 @@ func TestBugValidity(t *testing.T) { bug1.Append(createOp) if !bug1.IsValid() { - t.Fatal("Bug with just a CREATE should be valid") + t.Fatal("Bug with just a CreateOp should be valid") } bug1.Append(createOp) if bug1.IsValid() { - t.Fatal("Bug with multiple CREATE should be invalid") + t.Fatal("Bug with multiple CreateOp should be invalid") } bug1.Commit(mockRepo) if bug1.IsValid() { - t.Fatal("Bug with multiple CREATE should be invalid") + t.Fatal("Bug with multiple CreateOp should be invalid") } } diff --git a/tests/operation_iterator_test.go b/tests/operation_iterator_test.go index 03747fa4..9c7c82b6 100644 --- a/tests/operation_iterator_test.go +++ b/tests/operation_iterator_test.go @@ -16,6 +16,7 @@ var ( createOp = operations.NewCreateOp(rene, "title", "message") setTitleOp = operations.NewSetTitleOp("title2") addCommentOp = operations.NewAddCommentOp(rene, "message2") + SetStatusOp = operations.NewSetStatusOp(bug.ClosedStatus) mockRepo = repository.NewMockRepoForTest() ) @@ -29,6 +30,7 @@ func TestOpIterator(t *testing.T) { bug1.Append(createOp) bug1.Append(setTitleOp) + bug1.Append(SetStatusOp) bug1.Commit(mockRepo) bug1.Append(setTitleOp) -- cgit