Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-12-19 13:50:01 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-12-19 13:50:01 +0300
commitfb23153343f274a29cba1023759f675aaf64251a (patch)
tree96a04361543298c37b455af4e26b2350d5e2a15e /spec/requests
parent64d7772b6f0594896eb1ac67d5d3f4c33c813fe3 (diff)
Delete the project when building the build
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20222756
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/ci/api/builds_spec.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb
index d61a9afd12e..2963fe85478 100644
--- a/spec/requests/ci/api/builds_spec.rb
+++ b/spec/requests/ci/api/builds_spec.rb
@@ -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,
- :pending,
- :trace,
- runner_id: runner.id,
- pipeline: pipeline)
+ 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