Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-01-24 23:49:10 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2017-02-16 17:38:40 +0300
commitc70dfbc68614658c98a0f17a01413844a2a98abf (patch)
treea12191c56ec8313a033759db2eca31b0fe950e7d /spec/requests/api/branches_spec.rb
parent01ea65e0e9ea5e44fa653fb95e7ba8ca1668af98 (diff)
Add a custom pagination matcher
Diffstat (limited to 'spec/requests/api/branches_spec.rb')
-rw-r--r--spec/requests/api/branches_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb
index 91144b3e50d..2e6db0f43c6 100644
--- a/spec/requests/api/branches_spec.rb
+++ b/spec/requests/api/branches_spec.rb
@@ -18,7 +18,9 @@ describe API::Branches, api: true do
project.repository.expire_all_method_caches
get api("/projects/#{project.id}/repository/branches", user), per_page: 100
+
expect(response).to have_http_status(200)
+ expect(response).to include_pagination_headers
expect(json_response).to be_an Array
branch_names = json_response.map { |x| x['name'] }
expect(branch_names).to match_array(project.repository.branch_names)