Commit eaffe8cd authored by Toon Claes's avatar Toon Claes

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.
parent 2669fdbe
...@@ -34,6 +34,20 @@ feature 'Merge Request button', feature: true do ...@@ -34,6 +34,20 @@ feature 'Merge Request button', feature: true do
expect(page).to have_link(label, href: href) expect(page).to have_link(label, href: href)
end end
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 end
context 'logged in as non-member' do context 'logged in as non-member' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment