Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/quick_actions/merge_request/rebase_quick_action_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/quick_actions/merge_request/rebase_quick_action_shared_examples.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/support/shared_examples/quick_actions/merge_request/rebase_quick_action_shared_examples.rb b/spec/support/shared_examples/quick_actions/merge_request/rebase_quick_action_shared_examples.rb
index 2258bdd2c79..92705fc1b4d 100644
--- a/spec/support/shared_examples/quick_actions/merge_request/rebase_quick_action_shared_examples.rb
+++ b/spec/support/shared_examples/quick_actions/merge_request/rebase_quick_action_shared_examples.rb
@@ -75,7 +75,16 @@ RSpec.shared_examples 'rebase quick action' do
end
context 'when the merge request branch is protected from force push' do
- let!(:protected_branch) { create(:protected_branch, project: project, name: merge_request.source_branch, allow_force_push: false) }
+ let!(:protected_branch) do
+ ProtectedBranches::CreateService.new(
+ project,
+ user,
+ name: merge_request.source_branch,
+ allow_force_push: false,
+ push_access_levels_attributes: [{ access_level: Gitlab::Access::DEVELOPER }],
+ merge_access_levels_attributes: [{ access_level: Gitlab::Access::DEVELOPER }]
+ ).execute
+ end
it 'does not rebase the MR' do
add_note("/rebase")