Delete the project when building the build

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20222756
This commit is contained in:
Lin Jen-Shin 2016-12-19 18:50:01 +08:00
parent 64d7772b6f
commit fb23153343
1 changed files with 7 additions and 10 deletions

View File

@ -332,21 +332,18 @@ describe Ci::API::Builds do
context 'when project for the build has been deleted' do
let(:build) do
create(:ci_build,
result = create(:ci_build,
:pending,
:trace,
runner_id: runner.id,
pipeline: pipeline)
result.project.update(pending_delete: true)
result
end
it 'responds with forbidden' do
expect(response.status).to eq 403
end
def initial_patch_the_trace
build.project.update(pending_delete: true)
super
end
end
end