diff options
author | Toon Claes <toon@gitlab.com> | 2017-01-25 13:11:12 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-01-25 13:11:12 +0300 |
commit | eaffe8cd7202dfb0e459db484ebd4fe4c9d2e155 (patch) | |
tree | ee251869bf5f2759adbb3980bfd4c98252364ecb /spec/features/projects/merge_request_button_spec.rb | |
parent | 2669fdbe74a50f80d86119469deb1f48575816f5 (diff) |
Test there is no Merge Request button when MRs are disabled
In case Merge Requests are disabled on the project, no one should see
the Merge Request button.
Diffstat (limited to 'spec/features/projects/merge_request_button_spec.rb')
-rw-r--r-- | spec/features/projects/merge_request_button_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/projects/merge_request_button_spec.rb b/spec/features/projects/merge_request_button_spec.rb index e3c6347e81f..b6728960fb8 100644 --- a/spec/features/projects/merge_request_button_spec.rb +++ b/spec/features/projects/merge_request_button_spec.rb @@ -34,6 +34,20 @@ feature 'Merge Request button', feature: true do expect(page).to have_link(label, href: href) end end + + context 'merge requests are disabled' do + before do + project.project_feature.update!(merge_requests_access_level: ProjectFeature::DISABLED) + end + + it 'does not show Create Merge Request button' do + visit url + + within("#content-body") do + expect(page).not_to have_link(label) + end + end + end end context 'logged in as non-member' do |