diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-11 18:26:00 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-12 13:14:54 +0300 |
commit | b7ffc097fbb61972e150a6d48cbe9e5194aed11b (patch) | |
tree | 5ce53ec32d98dadaf58951f8f9b064276b200a41 /spec/support | |
parent | 3a77664d1a550cfbedc92068926e4adae9c82b87 (diff) |
Allow collaboration with forks through the API
These APIs are used by the web IDE.
They need to be on par with git & web access, allowing edits from
maintainers to forks with merge requests that allow access.
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_contexts/merge_requests_allowing_collaboration.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/support/shared_contexts/merge_requests_allowing_collaboration.rb b/spec/support/shared_contexts/merge_requests_allowing_collaboration.rb new file mode 100644 index 00000000000..05424d08b9d --- /dev/null +++ b/spec/support/shared_contexts/merge_requests_allowing_collaboration.rb @@ -0,0 +1,15 @@ +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 |