adding tests, but they arent running locally

This commit is contained in:
ryan
2018-03-22 19:33:33 +01:00
parent 20353db966
commit db91033b6e
+10
View File
@@ -79,6 +79,12 @@ func TestAnnotations(t *testing.T) {
Convey("Can read tags", func() {
So(items[0].Tags, ShouldResemble, []string{"outage", "error", "type:outage", "server:server-1"})
})
Convey("Has created and updated values", func() {
So(items[0].created, ShouldBeGreaterThan, 0)
So(items[0].updated, ShouldBeGreaterThan, 0)
So(items[0].created, ShouldBeEqual, items[1].created)
})
})
Convey("Can query for annotation by id", func() {
@@ -231,6 +237,10 @@ func TestAnnotations(t *testing.T) {
So(items[0].Tags, ShouldResemble, []string{"newtag1", "newtag2"})
So(items[0].Text, ShouldEqual, "something new")
})
Convey("Updated time has increased", func() {
So(items[0].updated, ShouldBeGreaterThan, items[0].created)
})
})
Convey("Can delete annotation", func() {