aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-08-11 14:08:03 +0200
committerMichael Muré <batolettre@gmail.com>2019-08-11 14:08:03 +0200
commit67a3752e176790e82a48706236f889cab4f8913d (patch)
tree113251396fc2569d1db2c2e6fcadb30289b3aa96 /bug/operation_test.go
parenta0dfc202117e31e01d2d6ec701a41292df35d35d (diff)
downloadgit-bug-67a3752e176790e82a48706236f889cab4f8913d.tar.gz
bug,entity: use a dedicated type to store IDs
Diffstat (limited to 'bug/operation_test.go')
-rw-r--r--bug/operation_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/bug/operation_test.go b/bug/operation_test.go
index c8dc246e..69c66dc8 100644
--- a/bug/operation_test.go
+++ b/bug/operation_test.go
@@ -94,26 +94,26 @@ func TestID(t *testing.T) {
b, op, err := Create(rene, time.Now().Unix(), "title", "message")
require.Nil(t, err)
- id1 := op.ID()
- require.True(t, IDIsValid(id1))
+ id1 := op.Id()
+ require.NoError(t, id1.Validate())
err = b.Commit(repo)
require.Nil(t, err)
op2 := b.FirstOp()
- id2 := op2.ID()
- require.True(t, IDIsValid(id2))
+ id2 := op2.Id()
+ require.NoError(t, id2.Validate())
require.Equal(t, id1, id2)
- b2, err := ReadLocalBug(repo, b.id)
+ b2, err := ReadLocalBug(repo, b.Id())
require.Nil(t, err)
op3 := b2.FirstOp()
- id3 := op3.ID()
- require.True(t, IDIsValid(id3))
+ id3 := op3.Id()
+ require.NoError(t, id3.Validate())
require.Equal(t, id1, id3)
}