diff options
Diffstat (limited to 'spec/support/shared_contexts/merge_requests_allowing_collaboration_shared_context.rb')
-rw-r--r-- | spec/support/shared_contexts/merge_requests_allowing_collaboration_shared_context.rb | 17 |
1 files changed, 17 insertions, 0 deletions
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 |