diff options
Diffstat (limited to 'spec/requests/api/issues_spec.rb')
-rw-r--r-- | spec/requests/api/issues_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index e9422cd2643..0b4f22bfb3d 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -25,6 +25,12 @@ describe API::API do json_response.should be_an Array json_response.first['title'].should == issue.title end + + it "should add pagination headers" do + get api("/issues?per_page=3", user) + response.headers['Link'].should == + '<http://www.example.com/api/v3/issues?page=1&per_page=3>; rel="first", <http://www.example.com/api/v3/issues?page=1&per_page=3>; rel="last"' + end end end |