diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-06 12:47:52 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-11 10:51:14 +0200 |
commit | ec43e3644436e0ae90f6fb6a64256c38ceb68cc9 (patch) | |
tree | ae0ad64114b9708cd04c43a3f398e9983aa62119 /spec/finders | |
parent | 267dba0ae56c6236b49907ad77fd572578c7b30e (diff) | |
download | gitlab-ce-ec43e3644436e0ae90f6fb6a64256c38ceb68cc9.tar.gz |
Prevent new merge requests for archived projects
This prevents creating merge requests targeting archived projects.
This could happen when a project was already forked, but then the
source was archived.
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/merge_request_target_project_finder_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/finders/merge_request_target_project_finder_spec.rb b/spec/finders/merge_request_target_project_finder_spec.rb index c81bfd7932c..f302cf80ce8 100644 --- a/spec/finders/merge_request_target_project_finder_spec.rb +++ b/spec/finders/merge_request_target_project_finder_spec.rb @@ -19,6 +19,12 @@ describe MergeRequestTargetProjectFinder do expect(finder.execute).to contain_exactly(forked_project) end + + it 'does not contain archived projects' do + base_project.update!(archived: true) + + expect(finder.execute).to contain_exactly(other_fork, forked_project) + end end context 'public projects' do |