aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bug_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-19 17:58:15 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-19 17:58:15 +0200
commit9f04fc2f7b31aeefa8281aff0d1d40a698f4b627 (patch)
tree23386ccbd3b53f51af8b35a144b1e9563d5ee621 /tests/bug_test.go
parentf42cf79443fd08f61385761f86ddeb0f914257e6 (diff)
downloadgit-bug-9f04fc2f7b31aeefa8281aff0d1d40a698f4b627.tar.gz
bug: replace the uuid based id with the hash of the first commit
Diffstat (limited to 'tests/bug_test.go')
-rw-r--r--tests/bug_test.go16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/bug_test.go b/tests/bug_test.go
index 175df1a8..e0737d1c 100644
--- a/tests/bug_test.go
+++ b/tests/bug_test.go
@@ -11,9 +11,15 @@ func TestBugId(t *testing.T) {
t.Error(err)
}
- if len(bug1.Id()) == 0 {
- t.Fatal("Bug doesn't have a human readable identifier")
+ bug1.Append(createOp)
+
+ err = bug1.Commit(mockRepo)
+
+ if err != nil {
+ t.Fatal(err)
}
+
+ bug1.Id()
}
func TestBugValidity(t *testing.T) {
@@ -38,7 +44,11 @@ func TestBugValidity(t *testing.T) {
t.Fatal("Bug with multiple CreateOp should be invalid")
}
- bug1.Commit(mockRepo)
+ err = bug1.Commit(mockRepo)
+
+ if err != nil {
+ t.Fatal(err)
+ }
if bug1.IsValid() {
t.Fatal("Bug with multiple CreateOp should be invalid")