diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-07-18 22:32:34 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-07-18 23:48:14 +0800 |
commit | 7bd5e571256aff6de132b118f04224e56abf3228 (patch) | |
tree | 4ec27daa73e2588299b73686ee8954ac299915b1 /spec/services | |
parent | 1ed6d1541c7973c08cdd4c1906ddcc0c3db893e3 (diff) | |
download | gitlab-ce-7bd5e571256aff6de132b118f04224e56abf3228.tar.gz |
Instead of adding master, stub_not_protect_default_branch
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) } |