aboutsummaryrefslogtreecommitdiffstats
path: root/identity/bare_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'identity/bare_test.go')
-rw-r--r--identity/bare_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/identity/bare_test.go b/identity/bare_test.go
index 7db9f644..335c8d37 100644
--- a/identity/bare_test.go
+++ b/identity/bare_test.go
@@ -5,12 +5,15 @@ import (
"testing"
"github.com/stretchr/testify/assert"
+
+ "github.com/MichaelMure/git-bug/entity"
)
func TestBare_Id(t *testing.T) {
i := NewBare("name", "email")
id := i.Id()
- assert.Equal(t, "7b226e616d65223a226e616d65222c22", id)
+ expected := entity.Id("e18b853fbd89d5d40ca24811539c9a800c705abd9232f396954e8ca8bb63fa8a")
+ assert.Equal(t, expected, id)
}
func TestBareSerialize(t *testing.T) {
@@ -28,5 +31,7 @@ func TestBareSerialize(t *testing.T) {
err = json.Unmarshal(data, &after)
assert.NoError(t, err)
+ before.id = after.id
+
assert.Equal(t, before, &after)
}