Test for func TimeIs0h

This commit is contained in:
Edward
2016-10-27 18:03:08 +02:00
parent 8002675a5f
commit 291f30475c

19
utils/coreutils_test.go Normal file
View File

@@ -0,0 +1,19 @@
package utils
import (
"testing"
"time"
)
func TestTimeIs0h(t *testing.T) {
t1, err := time.Parse(time.RFC3339, "2012-11-01T22:08:41+00:00")
if err != nil {
t.Log(err)
t.Errorf("time parsing error")
}
result := TimeIs0h(t1)
if result != false {
t.Errorf("time is 0 when it's supposed to be 2012-11-01T22:08:41+00:00")
}
}