Fix jsontime_test

This commit is contained in:
Julian Kornberger 2016-06-16 21:22:43 +02:00
parent 630eb62621
commit 1b68531e7a

View File

@ -25,7 +25,7 @@ func TestMarshalTime(t *testing.T) {
json, err := Time{nativeTime}.MarshalJSON()
assert.Nil(err)
assert.Equal(`"2012-11-01T22:08:41"`, string(json))
assert.Equal(`"2012-11-01T22:08:41+0000"`, string(json))
}
func TestUnmarshalValidTime(t *testing.T) {
@ -33,7 +33,7 @@ func TestUnmarshalValidTime(t *testing.T) {
jsonTime := Time{}
// valid time
err := jsonTime.UnmarshalJSON([]byte(`"2012-11-01T22:08:41"`))
err := jsonTime.UnmarshalJSON([]byte(`"2012-11-01T22:08:41+0000"`))
assert.Nil(err)
assert.False(jsonTime.IsZero())
}