diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bug_test.go | 14 | ||||
-rw-r--r-- | tests/operation_iterator_test.go | 6 |
2 files changed, 5 insertions, 15 deletions
diff --git a/tests/bug_test.go b/tests/bug_test.go index e0737d1c..fdda31b1 100644 --- a/tests/bug_test.go +++ b/tests/bug_test.go @@ -6,14 +6,11 @@ import ( ) func TestBugId(t *testing.T) { - bug1, err := bug.NewBug() - if err != nil { - t.Error(err) - } + bug1 := bug.NewBug() bug1.Append(createOp) - err = bug1.Commit(mockRepo) + err := bug1.Commit(mockRepo) if err != nil { t.Fatal(err) @@ -23,10 +20,7 @@ func TestBugId(t *testing.T) { } func TestBugValidity(t *testing.T) { - bug1, err := bug.NewBug() - if err != nil { - t.Error(err) - } + bug1 := bug.NewBug() if bug1.IsValid() { t.Fatal("Empty bug should be invalid") @@ -44,7 +38,7 @@ func TestBugValidity(t *testing.T) { t.Fatal("Bug with multiple CreateOp should be invalid") } - err = bug1.Commit(mockRepo) + err := bug1.Commit(mockRepo) if err != nil { t.Fatal(err) diff --git a/tests/operation_iterator_test.go b/tests/operation_iterator_test.go index bcbcfb08..a03553dc 100644 --- a/tests/operation_iterator_test.go +++ b/tests/operation_iterator_test.go @@ -23,11 +23,7 @@ var ( func TestOpIterator(t *testing.T) { - bug1, err := bug.NewBug() - - if err != nil { - t.Fatal(err) - } + bug1 := bug.NewBug() bug1.Append(createOp) bug1.Append(setTitleOp) |