Fix incorrect spec filenames which were ingored by CI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
c76812c79f
commit
bc695e264c
|
@ -63,4 +63,44 @@ describe Projects::BuildsController do
|
|||
expect(json_response['favicon']).to eq "/assets/ci_favicons/#{status.favicon}.ico"
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET trace.json' do
|
||||
let(:pipeline) { create(:ci_pipeline, project: project) }
|
||||
let(:build) { create(:ci_build, pipeline: pipeline) }
|
||||
let(:user) { create(:user) }
|
||||
|
||||
context 'when user is logged in as developer' do
|
||||
before do
|
||||
project.add_developer(user)
|
||||
sign_in(user)
|
||||
get_trace
|
||||
end
|
||||
|
||||
it 'traces build log' do
|
||||
expect(response).to have_http_status(:ok)
|
||||
expect(json_response['id']).to eq build.id
|
||||
expect(json_response['status']).to eq build.status
|
||||
end
|
||||
end
|
||||
|
||||
context 'when user is logged in as non member' do
|
||||
before do
|
||||
sign_in(user)
|
||||
get_trace
|
||||
end
|
||||
|
||||
it 'traces build log' do
|
||||
expect(response).to have_http_status(:ok)
|
||||
expect(json_response['id']).to eq build.id
|
||||
expect(json_response['status']).to eq build.status
|
||||
end
|
||||
end
|
||||
|
||||
def get_trace
|
||||
get :trace, namespace_id: project.namespace,
|
||||
project_id: project,
|
||||
id: build.id,
|
||||
format: :json
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Projects::BuildsController do
|
||||
include ApiHelpers
|
||||
|
||||
let(:project) { create(:empty_project, :public) }
|
||||
|
||||
describe 'GET trace.json' do
|
||||
let(:pipeline) { create(:ci_pipeline, project: project) }
|
||||
let(:build) { create(:ci_build, pipeline: pipeline) }
|
||||
let(:user) { create(:user) }
|
||||
|
||||
context 'when user is logged in as developer' do
|
||||
before do
|
||||
project.add_developer(user)
|
||||
sign_in(user)
|
||||
get_trace
|
||||
end
|
||||
|
||||
it 'traces build log' do
|
||||
expect(response).to have_http_status(:ok)
|
||||
expect(json_response['id']).to eq build.id
|
||||
expect(json_response['status']).to eq build.status
|
||||
end
|
||||
end
|
||||
|
||||
context 'when user is logged in as non member' do
|
||||
before do
|
||||
sign_in(user)
|
||||
get_trace
|
||||
end
|
||||
|
||||
it 'traces build log' do
|
||||
expect(response).to have_http_status(:ok)
|
||||
expect(json_response['id']).to eq build.id
|
||||
expect(json_response['status']).to eq build.status
|
||||
end
|
||||
end
|
||||
|
||||
def get_trace
|
||||
get :trace, namespace_id: project.namespace,
|
||||
project_id: project,
|
||||
id: build.id,
|
||||
format: :json
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue