diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-01 09:18:04 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-01 11:57:22 +0200 |
commit | 24c0f0d67198c98998514ff657562a599859d2c7 (patch) | |
tree | e31f370c3d07b6d8dfec8420c0d7da7fa9d830a3 /spec | |
parent | 473ea1e974cf07751601904b882de9ee2b3d0618 (diff) | |
download | gitlab-ce-24c0f0d67198c98998514ff657562a599859d2c7.tar.gz |
Add feature test for accessing MR created from fork
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/merge_requests/created_from_fork_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/merge_requests/created_from_fork_spec.rb b/spec/features/merge_requests/created_from_fork_spec.rb new file mode 100644 index 00000000000..c1fdec3a550 --- /dev/null +++ b/spec/features/merge_requests/created_from_fork_spec.rb @@ -0,0 +1,28 @@ +require 'spec_helper' + +feature 'Merge request created from fork' do + given(:user) { create(:user) } + given(:project) { create(:project, :public) } + given(:fork_project) { create(:project, :public) } + + given!(:merge_request) do + create(:forked_project_link, forked_to_project: fork_project, + forked_from_project: project) + + create(:merge_request, source_project: fork_project, + target_project: project, + description: 'Test merge request') + end + + before do + project.team << [user, :master] + + login_as user + visit namespace_project_merge_request_path(project.namespace, + project, merge_request) + end + + scenario 'user can access merge request' do + expect(page).to have_content 'Test merge request' + end +end |