aboutsummaryrefslogtreecommitdiffstats
path: root/bug/op_set_metadata_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-02-16 17:32:30 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:40:24 +0100
commitd2483d83dd52365741f51eca106aa18c4e8d6420 (patch)
treeb1265d1874005952febe8d469435827a4947ba7b /bug/op_set_metadata_test.go
parentcd7ed7ff9e3250c10e97fe16c934b5a6151527bb (diff)
downloadgit-bug-d2483d83dd52365741f51eca106aa18c4e8d6420.tar.gz
identity: I can compile again !!
Diffstat (limited to 'bug/op_set_metadata_test.go')
-rw-r--r--bug/op_set_metadata_test.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/bug/op_set_metadata_test.go b/bug/op_set_metadata_test.go
index 847164f3..a7f9f313 100644
--- a/bug/op_set_metadata_test.go
+++ b/bug/op_set_metadata_test.go
@@ -7,13 +7,13 @@ import (
"github.com/MichaelMure/git-bug/identity"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestSetMetadata(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)
@@ -22,9 +22,7 @@ func TestSetMetadata(t *testing.T) {
snapshot.Operations = append(snapshot.Operations, create)
hash1, err := create.Hash()
- if err != nil {
- t.Fatal(err)
- }
+ require.NoError(t, err)
comment := NewAddCommentOp(rene, unix, "comment", nil)
comment.SetMetadata("key2", "value2")
@@ -32,9 +30,7 @@ func TestSetMetadata(t *testing.T) {
snapshot.Operations = append(snapshot.Operations, comment)
hash2, err := comment.Hash()
- if err != nil {
- t.Fatal(err)
- }
+ require.NoError(t, err)
op1 := NewSetMetadataOp(rene, unix, hash1, map[string]string{
"key": "override",