diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-10-19 11:01:44 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-10-19 11:01:44 +0000 |
commit | ffc505d2170fff93607e37f3a634984b90549436 (patch) | |
tree | 62c9cd0a044b226dae32fcb9ad61cfb5bba8ee07 /spec/finders | |
parent | e2b8337f12a45219548c37287e3929e751e4704d (diff) | |
parent | f3fba178b931cd2ba67f81ee667893cb84e7d42f (diff) | |
download | gitlab-ce-ffc505d2170fff93607e37f3a634984b90549436.tar.gz |
Merge branch 'bvl-remove-forked-project-link' into 'master'
Remove ForkedProjectLink model
Closes #38883
See merge request gitlab-org/gitlab-ce!22226
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/fork_projects_finder_spec.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/finders/fork_projects_finder_spec.rb b/spec/finders/fork_projects_finder_spec.rb index f0cef7ea406..b3fdffc3331 100644 --- a/spec/finders/fork_projects_finder_spec.rb +++ b/spec/finders/fork_projects_finder_spec.rb @@ -1,20 +1,21 @@ require 'spec_helper' describe ForkProjectsFinder do - let(:source_project) { create(:project, :empty_repo) } - let(:private_fork) { create(:project, :private, :empty_repo, name: 'A') } - let(:internal_fork) { create(:project, :internal, :empty_repo, name: 'B') } - let(:public_fork) { create(:project, :public, :empty_repo, name: 'C') } + include ProjectForksHelper + + let(:source_project) { create(:project, :public, :empty_repo) } + let(:private_fork) { fork_project(source_project, nil, name: 'A') } + let(:internal_fork) { fork_project(source_project, nil, name: 'B') } + let(:public_fork) { fork_project(source_project, nil, name: 'C') } let(:non_member) { create(:user) } let(:private_fork_member) { create(:user) } before do + private_fork.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE) private_fork.add_developer(private_fork_member) - source_project.forks << private_fork - source_project.forks << internal_fork - source_project.forks << public_fork + internal_fork.update!(visibility_level: Gitlab::VisibilityLevel::INTERNAL) end describe '#execute' do |