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:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-11 11:10:22 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-16 11:52:28 +0300
commitb35d16a77f6a63db756a94eeff3788e819e7ed04 (patch)
treef0916f7aecaf44ef7150b5a832d202a5a05a190e /spec/requests
parent8583e4a1478ffe94dfd75c51c8480b323cada6df (diff)
Allow admin to assign shared runner to project through API
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/runners_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb
index 44eac4b2073..c7587c877fc 100644
--- a/spec/requests/api/runners_spec.rb
+++ b/spec/requests/api/runners_spec.rb
@@ -592,6 +592,15 @@ describe API::Runners do
end.to change { project.runners.count }.by(+1)
expect(response).to have_gitlab_http_status(201)
end
+
+ it 'enables a shared runner' do
+ expect do
+ post api("/projects/#{project.id}/runners", admin), runner_id: shared_runner.id
+ end.to change { project.runners.count }.by(1)
+
+ expect(shared_runner.reload).not_to be_shared
+ expect(response).to have_gitlab_http_status(201)
+ end
end
context 'user is not admin' do