BigW Consortium Gitlab

Commit 41e0029c by Bryce Johnson

Move spec and add one for merge button not disabled.

parent 0eaa65d5
......@@ -206,4 +206,33 @@ describe 'Merge request', :feature, :js do
end
end
end
context 'user can merge into source project but cannot push to fork', js: true do
let(:fork_project) { create(:project, :public) }
let!(:merge_request_from_fork) do
create(:forked_project_link, forked_to_project: fork_project,
forked_from_project: project)
create(:merge_request_with_diffs, source_project: fork_project,
target_project: project)
end
let(:user2) { create(:user) }
before do
project.team << [user2, :master]
logout
login_as user2
visit namespace_project_merge_request_path(project.namespace, project, merge_request_from_fork)
end
it 'user can merge into the source project' do
expect(page).to have_button('Merge', disabled: false)
end
it 'user cannot remove source branch' do
expect(page).to have_field('remove-source-branch-input', disabled: true)
end
end
end
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