diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-10 21:18:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-10 21:18:16 +0300 |
commit | e0277d5393d958865fdec470176ac5874edded06 (patch) | |
tree | f867094e393909ef822e354b1c72997ec5102f6f /spec/support/shared_examples/quick_actions/merge_request/rebase_quick_action_shared_examples.rb | |
parent | 74d9798736a89f07e047698e5e32964829bf8859 (diff) |
Add latest changes from gitlab-org/gitlab@master
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.rb | 10 |
1 files changed, 10 insertions, 0 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 28decb4011d..2258bdd2c79 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 @@ -73,6 +73,16 @@ RSpec.shared_examples 'rebase quick action' do expect(page).to have_content 'This merge request cannot be rebased while there are conflicts.' end 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) } + + it 'does not rebase the MR' do + add_note("/rebase") + + expect(page).to have_content 'This merge request branch is protected from force push.' + end + end end context 'when the current user cannot rebase the MR' do |