Add seperated 'describe' block for build trace specs
This commit is contained in:
parent
990bd06c04
commit
13032b713d
1 changed files with 14 additions and 8 deletions
|
@ -73,7 +73,7 @@ describe API::API, api: true do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'GET /projects/:id/builds/:build_id(/trace)?' do
|
||||
describe 'GET /projects/:id/builds/:build_id' do
|
||||
context 'authorized user' do
|
||||
it 'should return specific build data' do
|
||||
get api("/projects/#{project.id}/builds/#{build.id}", user)
|
||||
|
@ -81,13 +81,6 @@ describe API::API, api: true do
|
|||
expect(response.status).to eq(200)
|
||||
expect(json_response['name']).to eq('test')
|
||||
end
|
||||
|
||||
it 'should return specific build trace' do
|
||||
get api("/projects/#{project.id}/builds/#{build_with_trace.id}/trace", user)
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to eq(build_with_trace.trace)
|
||||
end
|
||||
end
|
||||
|
||||
context 'unauthorized user' do
|
||||
|
@ -96,7 +89,20 @@ describe API::API, api: true do
|
|||
|
||||
expect(response.status).to eq(401)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET /projects/:id/builds/:build_id/trace' do
|
||||
context 'authorized user' do
|
||||
it 'should return specific build trace' do
|
||||
get api("/projects/#{project.id}/builds/#{build_with_trace.id}/trace", user)
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to eq(build_with_trace.trace)
|
||||
end
|
||||
end
|
||||
|
||||
context 'unauthorized user' do
|
||||
it 'should not return specific build trace' do
|
||||
get api("/projects/#{project.id}/builds/#{build_with_trace.id}/trace")
|
||||
|
||||
|
|
Loading…
Reference in a new issue