aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-19 18:34:25 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-19 18:34:25 +0200
commit59e6ae872cad5683a9f1887cbef382d0e76ecc61 (patch)
tree747cad4cd54adb225e927429979252f8b0433a68 /tests
parent0a7814f33a44a57924ac4c6dfeca20cf741dc1f3 (diff)
downloadgit-bug-59e6ae872cad5683a9f1887cbef382d0e76ecc61.tar.gz
NewBug can no longer error
Diffstat (limited to 'tests')
-rw-r--r--tests/bug_test.go14
-rw-r--r--tests/operation_iterator_test.go6
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)