Commit fb231533 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Delete the project when building the build

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20222756
parent 64d7772b
...@@ -332,21 +332,18 @@ describe Ci::API::Builds do ...@@ -332,21 +332,18 @@ describe Ci::API::Builds do
context 'when project for the build has been deleted' do context 'when project for the build has been deleted' do
let(:build) do let(:build) do
create(:ci_build, result = create(:ci_build,
:pending, :pending,
:trace, :trace,
runner_id: runner.id, runner_id: runner.id,
pipeline: pipeline) pipeline: pipeline)
result.project.update(pending_delete: true)
result
end end
it 'responds with forbidden' do it 'responds with forbidden' do
expect(response.status).to eq 403 expect(response.status).to eq 403
end end
def initial_patch_the_trace
build.project.update(pending_delete: true)
super
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment