diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/lib/gitlab/pagination | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/lib/gitlab/pagination')
-rw-r--r-- | spec/lib/gitlab/pagination/keyset/request_context_spec.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/lib/gitlab/pagination/keyset/request_context_spec.rb b/spec/lib/gitlab/pagination/keyset/request_context_spec.rb index 6cd5ccc3c19..d6d5340f38b 100644 --- a/spec/lib/gitlab/pagination/keyset/request_context_spec.rb +++ b/spec/lib/gitlab/pagination/keyset/request_context_spec.rb @@ -60,9 +60,7 @@ describe Gitlab::Pagination::Keyset::RequestContext do it 'sets Links header with same host/path as the original request' do orig_uri = URI.parse(request_context.request.url) - expect(request_context).to receive(:header) do |name, header| - expect(name).to eq('Links') - + expect(request_context).to receive(:header).twice do |name, header| first_link, _ = /<([^>]+)>; rel="next"/.match(header).captures uri = URI.parse(first_link) @@ -77,9 +75,7 @@ describe Gitlab::Pagination::Keyset::RequestContext do it 'sets Links header with a link to the next page' do orig_uri = URI.parse(request_context.request.url) - expect(request_context).to receive(:header) do |name, header| - expect(name).to eq('Links') - + expect(request_context).to receive(:header).twice do |name, header| first_link, _ = /<([^>]+)>; rel="next"/.match(header).captures query = CGI.parse(URI.parse(first_link).query) @@ -97,9 +93,7 @@ describe Gitlab::Pagination::Keyset::RequestContext do it 'sets Links header with a link to the next page' do orig_uri = URI.parse(request_context.request.url) - expect(request_context).to receive(:header) do |name, header| - expect(name).to eq('Links') - + expect(request_context).to receive(:header).twice do |name, header| first_link, _ = /<([^>]+)>; rel="next"/.match(header).captures query = CGI.parse(URI.parse(first_link).query) |