diff options
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/ci/process_pipeline_service_spec.rb | 4 | ||||
-rw-r--r-- | spec/services/ci/retry_build_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/services/create_deployment_service_spec.rb | 4 |
3 files changed, 12 insertions, 4 deletions
diff --git a/spec/services/ci/process_pipeline_service_spec.rb b/spec/services/ci/process_pipeline_service_spec.rb index 1e938a97f5a..5a34ec12c8f 100644 --- a/spec/services/ci/process_pipeline_service_spec.rb +++ b/spec/services/ci/process_pipeline_service_spec.rb @@ -9,7 +9,9 @@ describe Ci::ProcessPipelineService, '#execute', :services do end before do - project.add_master(user) + stub_not_protect_default_branch + + project.add_developer(user) end context 'when simple pipeline is defined' do diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb index 52c6a4a0bc8..2cf62b54666 100644 --- a/spec/services/ci/retry_build_service_spec.rb +++ b/spec/services/ci/retry_build_service_spec.rb @@ -85,7 +85,9 @@ describe Ci::RetryBuildService, :services do context 'when user has ability to execute build' do before do - project.add_master(user) + stub_not_protect_default_branch + + project.add_developer(user) end it_behaves_like 'build duplication' @@ -131,7 +133,9 @@ describe Ci::RetryBuildService, :services do context 'when user has ability to execute build' do before do - project.add_master(user) + stub_not_protect_default_branch + + project.add_developer(user) end it_behaves_like 'build duplication' diff --git a/spec/services/create_deployment_service_spec.rb b/spec/services/create_deployment_service_spec.rb index 844d9d63428..2794721e157 100644 --- a/spec/services/create_deployment_service_spec.rb +++ b/spec/services/create_deployment_service_spec.rb @@ -244,7 +244,9 @@ describe CreateDeploymentService, services: true do context 'when job is retried' do it_behaves_like 'creates deployment' do before do - project.add_master(user) + stub_not_protect_default_branch + + project.add_developer(user) end let(:deployable) { Ci::Build.retry(job, user) } |