diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-19 14:42:00 +0000 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-03-01 14:38:35 +0000 |
commit | cd9daf644e2b3844b9382768a3add335f942b76c (patch) | |
tree | d0ddb0cdbf494c8fbb32133b4f46adf50178ea9b /spec/requests | |
parent | 442a6e880058138b6ae6843d9b70d62cbc5aadb0 (diff) | |
download | gitlab-ce-cd9daf644e2b3844b9382768a3add335f942b76c.tar.gz |
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/commits_spec.rb | 12 |
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 } |