From 2399724614f3c4dcf3059038d997193830de93ee Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 21 Jan 2020 03:08:37 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- ...ge_requests_allowing_collaboration_shared_context.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/support/shared_contexts/merge_requests_allowing_collaboration_shared_context.rb (limited to 'spec/support/shared_contexts/merge_requests_allowing_collaboration_shared_context.rb') diff --git a/spec/support/shared_contexts/merge_requests_allowing_collaboration_shared_context.rb b/spec/support/shared_contexts/merge_requests_allowing_collaboration_shared_context.rb new file mode 100644 index 00000000000..5412a991b22 --- /dev/null +++ b/spec/support/shared_contexts/merge_requests_allowing_collaboration_shared_context.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +RSpec.shared_context 'merge request allowing collaboration' do + include ProjectForksHelper + + let(:canonical) { create(:project, :public, :repository) } + let(:forked_project) { fork_project(canonical, nil, repository: true) } + + before do + canonical.add_maintainer(user) + create(:merge_request, + target_project: canonical, + source_project: forked_project, + source_branch: 'feature', + allow_collaboration: true) + end +end -- cgit v1.2.3