Merge branch 'dz-fix-v3-api-deployments-spec' into 'master'
Make api/v3/deployments_spec to actually tests v3 instead of current API See merge request !10965
This commit is contained in:
commit
419f39e34d
1 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe API::Deployments do
|
||||
describe API::V3::Deployments do
|
||||
let(:user) { create(:user) }
|
||||
let(:non_member) { create(:user) }
|
||||
let(:project) { deployment.environment.project }
|
||||
|
@ -24,11 +24,11 @@ describe API::Deployments do
|
|||
describe 'GET /projects/:id/deployments' do
|
||||
context 'as member of the project' do
|
||||
it_behaves_like 'a paginated resources' do
|
||||
let(:request) { get api("/projects/#{project.id}/deployments", user) }
|
||||
let(:request) { get v3_api("/projects/#{project.id}/deployments", user) }
|
||||
end
|
||||
|
||||
it 'returns projects deployments' do
|
||||
get api("/projects/#{project.id}/deployments", user)
|
||||
get v3_api("/projects/#{project.id}/deployments", user)
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(json_response).to be_an Array
|
||||
|
@ -40,7 +40,7 @@ describe API::Deployments do
|
|||
|
||||
context 'as non member' do
|
||||
it 'returns a 404 status code' do
|
||||
get api("/projects/#{project.id}/deployments", non_member)
|
||||
get v3_api("/projects/#{project.id}/deployments", non_member)
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
|
@ -50,7 +50,7 @@ describe API::Deployments do
|
|||
describe 'GET /projects/:id/deployments/:deployment_id' do
|
||||
context 'as a member of the project' do
|
||||
it 'returns the projects deployment' do
|
||||
get api("/projects/#{project.id}/deployments/#{deployment.id}", user)
|
||||
get v3_api("/projects/#{project.id}/deployments/#{deployment.id}", user)
|
||||
|
||||
expect(response).to have_http_status(200)
|
||||
expect(json_response['sha']).to match /\A\h{40}\z/
|
||||
|
@ -60,7 +60,7 @@ describe API::Deployments do
|
|||
|
||||
context 'as non member' do
|
||||
it 'returns a 404 status code' do
|
||||
get api("/projects/#{project.id}/deployments/#{deployment.id}", non_member)
|
||||
get v3_api("/projects/#{project.id}/deployments/#{deployment.id}", non_member)
|
||||
|
||||
expect(response).to have_http_status(404)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue