summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-02-19 14:42:00 +0000
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-03-01 14:38:35 +0000
commitcd9daf644e2b3844b9382768a3add335f942b76c (patch)
treed0ddb0cdbf494c8fbb32133b4f46adf50178ea9b /spec/requests
parent442a6e880058138b6ae6843d9b70d62cbc5aadb0 (diff)
downloadgitlab-ce-cd9daf644e2b3844b9382768a3add335f942b76c.tar.gz
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/commits_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb
index ad3eec88952..852f67db958 100644
--- a/spec/requests/api/commits_spec.rb
+++ b/spec/requests/api/commits_spec.rb
@@ -149,6 +149,18 @@ describe API::Commits do
end
end
+ context 'all optional parameter' do
+ it 'returns all project commits' do
+ commit_count = project.repository.count_commits(all: true)
+
+ get api("/projects/#{project_id}/repository/commits?all=true", user)
+
+ expect(response).to include_pagination_headers
+ expect(response.headers['X-Total']).to eq(commit_count.to_s)
+ expect(response.headers['X-Page']).to eql('1')
+ end
+ end
+
context 'with pagination params' do
let(:page) { 1 }
let(:per_page) { 5 }