summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-31 11:22:12 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-05-31 11:22:12 +0200
commitc9b653b4a0981647270c70122b01bfa6744c451b (patch)
treeae0955427cdcc5aebdf5f5ae862ecbcbbaacf567 /spec/services
parentfb1b7b00f3f76e0c0ace91b5dfea63408c24de08 (diff)
downloadgitlab-ce-c9b653b4a0981647270c70122b01bfa6744c451b.tar.gz
Fix pipeline retry specs related to protected actions
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/ci/retry_pipeline_service_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/services/ci/retry_pipeline_service_spec.rb b/spec/services/ci/retry_pipeline_service_spec.rb
index d941d56c0d8..3e860203063 100644
--- a/spec/services/ci/retry_pipeline_service_spec.rb
+++ b/spec/services/ci/retry_pipeline_service_spec.rb
@@ -6,9 +6,12 @@ describe Ci::RetryPipelineService, '#execute', :services do
let(:pipeline) { create(:ci_pipeline, project: project) }
let(:service) { described_class.new(project, user) }
- context 'when user has ability to modify pipeline' do
+ context 'when user has full ability to modify pipeline' do
before do
- project.add_master(user)
+ project.add_developer(user)
+
+ create(:protected_branch, :developers_can_merge,
+ name: pipeline.ref, project: project)
end
context 'when there are already retried jobs present' do