aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_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/operation_test.go
parentcd7ed7ff9e3250c10e97fe16c934b5a6151527bb (diff)
downloadgit-bug-d2483d83dd52365741f51eca106aa18c4e8d6420.tar.gz
identity: I can compile again !!
Diffstat (limited to 'bug/operation_test.go')
-rw-r--r--bug/operation_test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/bug/operation_test.go b/bug/operation_test.go
index d5cb5090..f9a7d191 100644
--- a/bug/operation_test.go
+++ b/bug/operation_test.go
@@ -2,6 +2,7 @@ package bug
import (
"testing"
+ "time"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
@@ -11,6 +12,9 @@ import (
)
func TestValidate(t *testing.T) {
+ rene := identity.NewIdentity("René Descartes", "rene@descartes.fr")
+ unix := time.Now().Unix()
+
good := []Operation{
NewCreateOp(rene, unix, "title", "message", nil),
NewSetTitleOp(rene, unix, "title2", "title1"),
@@ -65,7 +69,8 @@ func TestValidate(t *testing.T) {
}
func TestMetadata(t *testing.T) {
- op := NewCreateOp(rene, unix, "title", "message", nil)
+ rene := identity.NewIdentity("René Descartes", "rene@descartes.fr")
+ op := NewCreateOp(rene, time.Now().Unix(), "title", "message", nil)
op.SetMetadata("key", "value")
@@ -81,7 +86,9 @@ func TestHash(t *testing.T) {
}
for _, repo := range repos {
- b, op, err := Create(rene, unix, "title", "message")
+ rene := identity.NewBare("René Descartes", "rene@descartes.fr")
+
+ b, op, err := Create(rene, time.Now().Unix(), "title", "message")
require.Nil(t, err)
h1, err := op.Hash()