diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-05-28 14:41:04 +0300 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-31 11:56:41 +0300 |
commit | 5805e92299f91a8d849418a03ed0e6cbcbbb5568 (patch) | |
tree | 314431b777a0d59403e2cf86baf61469b0917f65 /spec/requests/api/runners_spec.rb | |
parent | 385f37a724f8c63f551e7236649a3f28058b860b (diff) |
Improve Runners API validations
Diffstat (limited to 'spec/requests/api/runners_spec.rb')
-rw-r--r-- | spec/requests/api/runners_spec.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb index 4dfc3b8cfc4..cc326ff6484 100644 --- a/spec/requests/api/runners_spec.rb +++ b/spec/requests/api/runners_spec.rb @@ -522,11 +522,7 @@ describe API::Runners do describe 'POST /projects/:id/runners' do context 'authorized user' do - let(:project_runner2) do - create(:ci_runner).tap do |runner| - create(:ci_runner_project, runner: runner, project: project2) - end - end + let(:project_runner2) { create(:ci_runner, :project, projects: [project2]) } it 'enables specific runner' do expect do @@ -539,7 +535,7 @@ describe API::Runners do expect do post api("/projects/#{project.id}/runners", user), runner_id: project_runner.id end.to change { project.runners.count }.by(0) - expect(response).to have_gitlab_http_status(409) + expect(response).to have_gitlab_http_status(400) end it 'does not enable locked runner' do |