diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-06-14 23:05:33 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-06-14 23:05:33 +0800 |
commit | 6c500034f4e626f28fa0a47534c24f7181131b43 (patch) | |
tree | 9269501787f26868f69a496eb9694104e6ae3d17 /spec | |
parent | fd285f71d8da46e76719a1055f168cd0b7e45094 (diff) | |
parent | f74f42386029077d0f12ac407fc6ee39aaeeaf53 (diff) | |
download | gitlab-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.rb | 2 |
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 |