aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_edit_comment_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/op_edit_comment_test.go')
-rw-r--r--bug/op_edit_comment_test.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/bug/op_edit_comment_test.go b/bug/op_edit_comment_test.go
index dbdf341d..72f8a168 100644
--- a/bug/op_edit_comment_test.go
+++ b/bug/op_edit_comment_test.go
@@ -7,30 +7,26 @@ import (
"github.com/MichaelMure/git-bug/identity"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestEdit(t *testing.T) {
snapshot := Snapshot{}
- var rene = identity.NewIdentity("René Descartes", "rene@descartes.fr")
-
+ rene := identity.NewBare("René Descartes", "rene@descartes.fr")
unix := time.Now().Unix()
create := NewCreateOp(rene, unix, "title", "create", nil)
create.Apply(&snapshot)
hash1, err := create.Hash()
- if err != nil {
- t.Fatal(err)
- }
+ require.NoError(t, err)
comment := NewAddCommentOp(rene, unix, "comment", nil)
comment.Apply(&snapshot)
hash2, err := comment.Hash()
- if err != nil {
- t.Fatal(err)
- }
+ require.NoError(t, err)
edit := NewEditCommentOp(rene, unix, hash1, "create edited", nil)
edit.Apply(&snapshot)