summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-14 23:05:33 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-06-14 23:05:33 +0800
commit6c500034f4e626f28fa0a47534c24f7181131b43 (patch)
tree9269501787f26868f69a496eb9694104e6ae3d17 /spec
parentfd285f71d8da46e76719a1055f168cd0b7e45094 (diff)
parentf74f42386029077d0f12ac407fc6ee39aaeeaf53 (diff)
downloadgitlab-ce-6c500034f4e626f28fa0a47534c24f7181131b43.tar.gz
Merge branch 'prefer-assign_to' into feature/runner-lock-on-project
* prefer-assign_to: Give 409 Conflict whenever the runner was already enabled We're checking return value rather than rescuing exceptions Prefer Runner#assign_to instead of creating directly
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/runners_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb
index 26dfa7bed05..b4c826522a5 100644
--- a/spec/requests/api/runners_spec.rb
+++ b/spec/requests/api/runners_spec.rb
@@ -379,7 +379,7 @@ describe API::Runners, api: true do
expect do
post api("/projects/#{project.id}/runners", user), runner_id: specific_runner.id
end.to change{ project.runners.count }.by(0)
- expect(response.status).to eq(201)
+ expect(response.status).to eq(409)
end
it 'should not enable locked runner' do