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:
parent
2669fdbe74
commit
eaffe8cd72
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue