summaryrefslogtreecommitdiff
path: root/spec/services/ci/register_job_service_spec.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-08-31 18:28:29 +0900
committerShinya Maeda <shinya@gitlab.com>2017-09-03 23:49:10 +0900
commit07f7a01b4da02533c417fa636f004fedf3c4c661 (patch)
tree4437591a427c5e1edf9792dc5e89d4f1d11cfd92 /spec/services/ci/register_job_service_spec.rb
parentd3bf01608013eac24764c1dacd51f8b841dd9bf1 (diff)
downloadgitlab-ce-07f7a01b4da02533c417fa636f004fedf3c4c661.tar.gz
Improve spec. Add validation for accel_level on runner.
Diffstat (limited to 'spec/services/ci/register_job_service_spec.rb')
-rw-r--r--spec/services/ci/register_job_service_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb
index e9bcb41c5f5..6f8ebf5d3ba 100644
--- a/spec/services/ci/register_job_service_spec.rb
+++ b/spec/services/ci/register_job_service_spec.rb
@@ -215,7 +215,9 @@ module Ci
end
end
- context 'when a runner is not_protected' do
+ context 'when access_level of runner is not_protected' do
+ let!(:specific_runner) { create(:ci_runner, :not_protected, :specific) }
+
context 'when a job is protected' do
let!(:pending_build) { create(:ci_build, :protected, pipeline: pipeline) }
@@ -233,7 +235,7 @@ module Ci
end
end
- context 'when a runner is ref_protected' do
+ context 'when access_level of runner is ref_protected' do
let!(:specific_runner) { create(:ci_runner, :ref_protected, :specific) }
context 'when a job is protected' do