forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauto_pagination.feature
More file actions
39 lines (32 loc) · 1.52 KB
/
auto_pagination.feature
File metadata and controls
39 lines (32 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Feature: Github API auto pagination
The gem permits to auto paginate resources.
Scenario: Passing auto_pagionation param to request
Given I have "Github::Client::Repos" instance
When I want to list resources
And I pass the following request options:
| user | per_page | auto_pagination |
| wycats | 45 | true |
And I make request within a cassette named "auto_pagination/repos/list"
Then the response status should be 200
And the response type should be JSON
And the response should have 150 items
Scenario: Passing auto_pagionation param to instances
Given I have "Github::Client::Repos" instance
And I pass the following request options:
| user | per_page | auto_pagination |
| wycats | 100 | true |
When I want to list resources
And I make request within a cassette named "auto_pagination/repos/global_list"
Then the response status should be 200
And the response type should be JSON
And the response should have 150 items
Scenario: Paginating single resource
Given I have "Github::Client::Repos" instance
And I pass the following request options:
| user | repo | auto_pagination |
| peter-murach | tty | true |
When I want to get resource
And I make request within a cassette named "auto_pagination/repos/get"
Then the response status should be 200
And the response type should be JSON
And the response body name should be tty