feat(testdata): worked on testdata app

This commit is contained in:
Torkel Ödegaard
2016-09-27 14:39:51 +02:00
parent 81cb4a740b
commit 34f15d92d0
30 changed files with 512 additions and 169 deletions

View File

@@ -60,6 +60,23 @@ func TestTimeRange(t *testing.T) {
})
})
Convey("can parse unix epocs", func() {
var err error
tr := TimeRange{
From: "1474973725473",
To: "1474975757930",
Now: now,
}
res, err := tr.FromTime()
So(err, ShouldBeNil)
So(res.Unix(), ShouldEqual, 1474973725473)
res, err = tr.ToTime()
So(err, ShouldBeNil)
So(res.Unix(), ShouldEqual, 1474975757930)
})
Convey("Cannot parse asdf", func() {
var err error
tr := TimeRange{