summaryrefslogtreecommitdiff
path: root/spec/requests/ci
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-12-19 22:19:03 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-12-19 22:19:03 +0800
commite6c83b1c1f3db5cea9730ae320f3a6525fd6fe2a (patch)
treef24d024b88d1cc93eed76b8b0a83203ffd071f96 /spec/requests/ci
parent1e2e0de9441a2f9777bb989e8a8c275c2b103ca7 (diff)
downloadgitlab-ce-e6c83b1c1f3db5cea9730ae320f3a6525fd6fe2a.tar.gz
Just set the status rather than calling event
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8091#note_20239558
Diffstat (limited to 'spec/requests/ci')
-rw-r--r--spec/requests/ci/api/builds_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb
index fdb2234d32b..5acda0fd729 100644
--- a/spec/requests/ci/api/builds_spec.rb
+++ b/spec/requests/ci/api/builds_spec.rb
@@ -251,9 +251,7 @@ describe Ci::API::Builds do
describe 'PATCH /builds/:id/trace.txt' do
let(:build) do
attributes = {runner_id: runner.id, pipeline: pipeline}
- create(:ci_build, :pending, :trace, attributes) do |build|
- build.run
- end
+ create(:ci_build, :running, :trace, attributes)
end
let(:headers) { { Ci::API::Helpers::BUILD_TOKEN_HEADER => build.token, 'Content-Type' => 'text/plain' } }
@@ -338,8 +336,7 @@ describe Ci::API::Builds do
context 'when project for the build has been deleted' do
let(:build) do
attributes = {runner_id: runner.id, pipeline: pipeline}
- create(:ci_build, :pending, :trace, attributes) do |build|
- build.run
+ create(:ci_build, :running, :trace, attributes) do |build|
build.project.update(pending_delete: true)
end
end