diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-08 23:33:45 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-08 23:33:45 +0100 |
commit | 4eb27d7c72d57015c7551a00e34a54cefc2d3db9 (patch) | |
tree | 41ae2e94fc85d4669e75e7945715b32779baded0 /spec | |
parent | d54bff2a770c1030056866a47097aee9937390ef (diff) | |
download | gitlab-ce-4eb27d7c72d57015c7551a00e34a54cefc2d3db9.tar.gz |
Add some modifications to builds API and specs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/builds_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index b6a1154cf76..799558d1bdd 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -50,7 +50,7 @@ describe API::API, api: true do context 'authorized user' do it 'should return project builds for specific commit' do project.ensure_ci_commit(commit.sha) - get api("/projects/#{project.id}/builds/commit/#{project.ci_commits.first.sha}", user) + get api("/projects/#{project.id}/builds/commit/#{commit.sha}", user) expect(response.status).to eq(200) expect(json_response).to be_an Array @@ -60,7 +60,7 @@ describe API::API, api: true do context 'unauthorized user' do it 'should not return project builds' do project.ensure_ci_commit(commit.sha) - get api("/projects/#{project.id}/builds/commit/#{project.ci_commits.first.sha}") + get api("/projects/#{project.id}/builds/commit/#{commit.sha}") expect(response.status).to eq(401) end @@ -99,7 +99,7 @@ describe API::API, api: true do end end - describe 'GET /projects/:id/builds/:build_id/cancel' do + describe 'POST /projects/:id/builds/:build_id/cancel' do context 'authorized user' do context 'user with :manage_builds persmission' do it 'should cancel running or pending build' do @@ -128,7 +128,7 @@ describe API::API, api: true do end end - describe 'GET /projects/:id/builds/:build_id/retry' do + describe 'POST /projects/:id/builds/:build_id/retry' do context 'authorized user' do context 'user with :manage_builds persmission' do it 'should retry non-running build' do |