diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-21 06:08:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-21 06:08:37 +0300 |
commit | 2399724614f3c4dcf3059038d997193830de93ee (patch) | |
tree | 3315c4453ef3efb5c1162911753436cad4f3e57d /spec/support/shared_contexts/merge_requests_allowing_collaboration_shared_context.rb | |
parent | 6755df108b123ecc8ae330d7c7bf2f04fbf36a81 (diff) |
Add latest changes from gitlab-org/gitlab@master
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 |