mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 23:47:44 +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"`
|
Title string `json:"title"`
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
Flair string `json:"flair"`
|
Flair string `json:"flair"`
|
||||||
Thumbnail string `json:"thumbnail"`
|
Thumbnail string `json:"thumbnail"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Thing) FullName() string {
|
func (t *Thing) FullName() string {
|
||||||
|
@ -106,7 +106,7 @@ func NewThing(val *fastjson.Value) *Thing {
|
||||||
t.Author = string(data.GetStringBytes("author"))
|
t.Author = string(data.GetStringBytes("author"))
|
||||||
t.Subject = string(data.GetStringBytes("subject"))
|
t.Subject = string(data.GetStringBytes("subject"))
|
||||||
t.Body = string(data.GetStringBytes("body"))
|
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.Context = string(data.GetStringBytes("context"))
|
||||||
t.ParentID = string(data.GetStringBytes("parent_id"))
|
t.ParentID = string(data.GetStringBytes("parent_id"))
|
||||||
t.LinkTitle = string(data.GetStringBytes("link_title"))
|
t.LinkTitle = string(data.GetStringBytes("link_title"))
|
||||||
|
|
|
@ -62,7 +62,7 @@ func TestListingResponseParsing(t *testing.T) {
|
||||||
assert.Equal(t, "", l.Before)
|
assert.Equal(t, "", l.Before)
|
||||||
|
|
||||||
thing := l.Children[0]
|
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, "t4", thing.Kind)
|
||||||
assert.Equal(t, "138z6ke", thing.ID)
|
assert.Equal(t, "138z6ke", thing.ID)
|
||||||
assert.Equal(t, "unknown", thing.Type)
|
assert.Equal(t, "unknown", thing.Type)
|
||||||
|
|
Loading…
Reference in a new issue