diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-03 15:07:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-03 15:07:28 +0300 |
commit | 5fabe42e23beba3fbe393e566a5a4ebde2062c61 (patch) | |
tree | 9a2dfa55656973763fcc05ac393bd2bd06125935 /spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb | |
parent | 4df4a22481c3ed10e22cdb795dd6d811c4e89fde (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb')
-rw-r--r-- | spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb b/spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb new file mode 100644 index 00000000000..4d2c59665bb --- /dev/null +++ b/spec/features/merge_request/user_opens_checkout_branch_modal_spec.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'Merge request > User opens checkout branch modal', :js do + include ProjectForksHelper + + let(:project) { create(:project, :public, :repository) } + let(:user) { project.creator } + + before do + project.add_maintainer(user) + sign_in(user) + end + + describe 'for fork' do + let(:author) { create(:user) } + let(:source_project) { fork_project(project, author, repository: true) } + + let(:merge_request) do + create(:merge_request, + source_project: source_project, + target_project: project, + source_branch: 'fix', + target_branch: 'master', + author: author, + allow_collaboration: true) + end + + it 'shows instructions' do + visit project_merge_request_path(project, merge_request) + + click_button 'Code' + click_button 'Check out branch' + + expect(page).to have_content(source_project.http_url_to_repo) + end + end +end |