diff options
author | Toon Claes <toon@iotcl.com> | 2017-08-17 17:56:01 +0200 |
---|---|---|
committer | Toon Claes <toon@iotcl.com> | 2017-08-17 21:47:01 +0200 |
commit | e17d9529faa4d292d7f869a0f9ebbbcde4cc6f9e (patch) | |
tree | 18a73c81e978dfb2828f38d793f35e1e7da55d77 /spec/lib/api | |
parent | a98d17a83877cd885a92aac29a9cb13d13a53a86 (diff) | |
download | gitlab-ce-e17d9529faa4d292d7f869a0f9ebbbcde4cc6f9e.tar.gz |
Total Pages should be at least onetc-git-tower-pagination-links
And the link to the last page cannot be `page=0`.
Diffstat (limited to 'spec/lib/api')
-rw-r--r-- | spec/lib/api/helpers/pagination_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/lib/api/helpers/pagination_spec.rb b/spec/lib/api/helpers/pagination_spec.rb index 041c40d9490..59deca7757b 100644 --- a/spec/lib/api/helpers/pagination_spec.rb +++ b/spec/lib/api/helpers/pagination_spec.rb @@ -107,7 +107,7 @@ describe API::Helpers::Pagination do it 'adds appropriate headers' do expect_header('X-Total', '0') - expect_header('X-Total-Pages', '0') + expect_header('X-Total-Pages', '1') expect_header('X-Per-Page', '2') expect_header('X-Page', '1') expect_header('X-Next-Page', '') @@ -118,6 +118,7 @@ describe API::Helpers::Pagination do expect(val).to include('rel="last"') expect(val).not_to include('rel="prev"') expect(val).not_to include('rel="next"') + expect(val).not_to include('page=0') end subject.paginate(resource) |