Fix to not return *Pagination
This commit is contained in:
parent
dd0b467062
commit
134128cb56
11 changed files with 136 additions and 138 deletions
|
@ -21,7 +21,7 @@ func TestGetFavourites(t *testing.T) {
|
|||
ClientSecret: "bar",
|
||||
AccessToken: "zoo",
|
||||
})
|
||||
favs, _, err := client.GetFavourites(context.Background(), nil)
|
||||
favs, err := client.GetFavourites(context.Background(), nil)
|
||||
if err != nil {
|
||||
t.Fatalf("should not be fail: %v", err)
|
||||
}
|
||||
|
@ -152,11 +152,11 @@ func TestGetRebloggedBy(t *testing.T) {
|
|||
ClientSecret: "bar",
|
||||
AccessToken: "zoo",
|
||||
})
|
||||
_, _, err := client.GetRebloggedBy(context.Background(), 123, nil)
|
||||
_, err := client.GetRebloggedBy(context.Background(), 123, nil)
|
||||
if err == nil {
|
||||
t.Fatalf("should be fail: %v", err)
|
||||
}
|
||||
rbs, _, err := client.GetRebloggedBy(context.Background(), 1234567, nil)
|
||||
rbs, err := client.GetRebloggedBy(context.Background(), 1234567, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("should not be fail: %v", err)
|
||||
}
|
||||
|
@ -188,11 +188,11 @@ func TestGetFavouritedBy(t *testing.T) {
|
|||
ClientSecret: "bar",
|
||||
AccessToken: "zoo",
|
||||
})
|
||||
_, _, err := client.GetFavouritedBy(context.Background(), 123, nil)
|
||||
_, err := client.GetFavouritedBy(context.Background(), 123, nil)
|
||||
if err == nil {
|
||||
t.Fatalf("should be fail: %v", err)
|
||||
}
|
||||
fbs, _, err := client.GetFavouritedBy(context.Background(), 1234567, nil)
|
||||
fbs, err := client.GetFavouritedBy(context.Background(), 1234567, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("should not be fail: %v", err)
|
||||
}
|
||||
|
@ -338,11 +338,11 @@ func TestGetTimelinePublic(t *testing.T) {
|
|||
defer ts.Close()
|
||||
|
||||
client := NewClient(&Config{Server: ts.URL})
|
||||
_, _, err := client.GetTimelinePublic(context.Background(), false, nil)
|
||||
_, err := client.GetTimelinePublic(context.Background(), false, nil)
|
||||
if err == nil {
|
||||
t.Fatalf("should be fail: %v", err)
|
||||
}
|
||||
tl, _, err := client.GetTimelinePublic(context.Background(), true, nil)
|
||||
tl, err := client.GetTimelinePublic(context.Background(), true, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("should not be fail: %v", err)
|
||||
}
|
||||
|
@ -374,11 +374,11 @@ func TestGetTimelineHashtag(t *testing.T) {
|
|||
ClientSecret: "bar",
|
||||
AccessToken: "zoo",
|
||||
})
|
||||
_, _, err := client.GetTimelineHashtag(context.Background(), "notfound", false, nil)
|
||||
_, err := client.GetTimelineHashtag(context.Background(), "notfound", false, nil)
|
||||
if err == nil {
|
||||
t.Fatalf("should be fail: %v", err)
|
||||
}
|
||||
tags, _, err := client.GetTimelineHashtag(context.Background(), "zzz", true, nil)
|
||||
tags, err := client.GetTimelineHashtag(context.Background(), "zzz", true, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("should not be fail: %v", err)
|
||||
}
|
||||
|
@ -410,11 +410,11 @@ func TestGetTimelineMedia(t *testing.T) {
|
|||
ClientSecret: "bar",
|
||||
AccessToken: "zoo",
|
||||
})
|
||||
_, _, err := client.GetTimelineMedia(context.Background(), false, nil)
|
||||
_, err := client.GetTimelineMedia(context.Background(), false, nil)
|
||||
if err == nil {
|
||||
t.Fatalf("should be fail: %v", err)
|
||||
}
|
||||
tags, _, err := client.GetTimelineMedia(context.Background(), true, nil)
|
||||
tags, err := client.GetTimelineMedia(context.Background(), true, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("should not be fail: %v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue