diff options
author | drew cimino <dcimino@gitlab.com> | 2019-04-11 16:21:18 +0100 |
---|---|---|
committer | drew cimino <dcimino@gitlab.com> | 2019-06-04 20:25:26 -0500 |
commit | 42d6d3187fb7305daead326bfdf56a09c249f829 (patch) | |
tree | 5522fd8f7894f2913d27b691f1662e85b38aaa7f /spec/services/ci/create_pipeline_service_spec.rb | |
parent | ebc18b45c7e72b28c1981446c95433611903868d (diff) | |
download | gitlab-ce-42d6d3187fb7305daead326bfdf56a09c249f829.tar.gz |
preventing blocked users and their PipelineSchdules from creating new Pipelines
updated several specs and factories to accomodate new permissions
Diffstat (limited to 'spec/services/ci/create_pipeline_service_spec.rb')
-rw-r--r-- | spec/services/ci/create_pipeline_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 867692d4d64..d9b61dfe503 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -1132,5 +1132,17 @@ describe Ci::CreatePipelineService do .with_message('Insufficient permissions to create a new pipeline') end end + + context 'when a user with permissions has been blocked' do + before do + user.block! + end + + it 'raises an error' do + expect { subject } + .to raise_error(described_class::CreateError) + .with_message('Insufficient permissions to create a new pipeline') + end + end end end |