Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Xe committed Mar 23, 2019
1 parent 395fdf7 commit 8e7d0f5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ type Filter struct {
Description string `json:"description"`
HiddenTagIds []int64 `json:"hidden_tag_ids"`
SpoileredTagIds []int64 `json:"spoilered_tag_ids"`
SpoileredTags string `json:"spoilered_tags"`
HiddenTags string `json:"hidden_tags"`
SpoileredTags []string `json:"spoilered_tags"`
HiddenTags []string `json:"hidden_tags"`
HiddenComplex string `json:"hidden_complex"`
SpoileredComplex string `json:"spoilered_complex"`
Public bool `json:"public"`
Expand Down
2 changes: 1 addition & 1 deletion image.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type Image struct {
Faves int `json:"faves"`
CommentCount int `json:"comment_count"`
Tags string `json:"tags"`
TagIds []string `json:"tag_ids"`
TagIds []int64 `json:"tag_ids"`
Width int `json:"width"`
Height int `json:"height"`
AspectRatio float64 `json:"aspect_ratio"`
Expand Down
5 changes: 2 additions & 3 deletions image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ func TestGetImage(t *testing.T) {
ctx, myC := setup()

const imageID = 912673 // https://derpibooru.org/912673
const imageIDStr = "912673"

i, _, err := myC.GetImage(ctx, imageID)
if err != nil {
t.Fatal(err)
}

if i.ID != imageIDStr {
t.Fatalf("ID is wrong: expected %v, got %s", imageID, i.ID)
if i.ID != imageID {
t.Fatalf("ID is wrong: expected %v, got %d", imageID, i.ID)
}
}
2 changes: 1 addition & 1 deletion user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "testing"
func TestGetUserInformation(t *testing.T) {
ctx, myC := setup()

const username = "Xena" // https://derpibooru.org/profiles/Xena - Creator of this library
const username = "Carcer" // https://derpibooru.org/profiles/Carcer - one of the admins

u, err := myC.GetUser(ctx, username)
if err != nil {
Expand Down

0 comments on commit 8e7d0f5

Please sign in to comment.