diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2013-10-29 13:41:20 +0400 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2013-10-29 13:41:20 +0400 |
commit | 0678b8a426553110e63dde3c75aaf719e74771e1 (patch) | |
tree | 0a6d1e5f03e841f798eb7bfc225fd5f3d7b010df /spec | |
parent | ff7073ac23afdf5873f0b5eaee54b9c735e7e04d (diff) | |
download | gitlab-ce-0678b8a426553110e63dde3c75aaf719e74771e1.tar.gz |
add 'Link' header for API response
Diffstat (limited to 'spec')
-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 c55025d72b5..505e9597e1b 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 |