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.
This commit is contained in:
Toon Claes 2017-01-25 11:11:12 +01:00
parent 2669fdbe74
commit eaffe8cd72
1 changed files with 14 additions and 0 deletions

View File

@ -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