Skip to content

Commit

Permalink
Merge pull request #111 from jackmcguire1/nick/helix
Browse files Browse the repository at this point in the history
HOTIX: user subscriptions total field
  • Loading branch information
nicklaw5 committed Jul 26, 2021
2 parents d401db2 + 55718f9 commit 1ea4433
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func (c *Client) GetSubscriptions(params *SubscriptionsParams) (*SubscriptionsRe
resp.HydrateResponseCommon(&subscriptions.ResponseCommon)
subscriptions.Data.Subscriptions = resp.Data.(*ManySubscriptions).Subscriptions
subscriptions.Data.Pagination = resp.Data.(*ManySubscriptions).Pagination
subscriptions.Data.Total = resp.Data.(*ManySubscriptions).Total

return subscriptions, nil
}
Expand Down
5 changes: 5 additions & 0 deletions subscriptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func TestGetSubscriptions(t *testing.T) {

continue
}

if resp.Data.Total != 1 {
t.Errorf("expected total field to be 1 got %d", resp.Data.Total)
}

}

// Test with HTTP Failure
Expand Down

0 comments on commit 1ea4433

Please sign in to comment.