mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-22 14:25:28 +00:00
fix tests
This commit is contained in:
parent
ead14c8bf0
commit
4fad10bade
2 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ type Thing struct {
|
|||
Title string `json:"title"`
|
||||
URL string `json:"url"`
|
||||
Flair string `json:"flair"`
|
||||
Thumbnail string `json:"thumbnail"`
|
||||
Thumbnail string `json:"thumbnail"`
|
||||
}
|
||||
|
||||
func (t *Thing) FullName() string {
|
||||
|
@ -106,7 +106,7 @@ func NewThing(val *fastjson.Value) *Thing {
|
|||
t.Author = string(data.GetStringBytes("author"))
|
||||
t.Subject = string(data.GetStringBytes("subject"))
|
||||
t.Body = string(data.GetStringBytes("body"))
|
||||
t.CreatedAt = time.Unix(unix, 0)
|
||||
t.CreatedAt = time.Unix(unix, 0).UTC()
|
||||
t.Context = string(data.GetStringBytes("context"))
|
||||
t.ParentID = string(data.GetStringBytes("parent_id"))
|
||||
t.LinkTitle = string(data.GetStringBytes("link_title"))
|
||||
|
|
|
@ -62,7 +62,7 @@ func TestListingResponseParsing(t *testing.T) {
|
|||
assert.Equal(t, "", l.Before)
|
||||
|
||||
thing := l.Children[0]
|
||||
created := time.Time(time.Date(2021, time.July, 14, 13, 56, 35, 0, time.Local))
|
||||
created := time.Time(time.Date(2021, time.July, 14, 17, 56, 35, 0, time.UTC))
|
||||
assert.Equal(t, "t4", thing.Kind)
|
||||
assert.Equal(t, "138z6ke", thing.ID)
|
||||
assert.Equal(t, "unknown", thing.Type)
|
||||
|
|
Loading…
Reference in a new issue