diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index ffbf0960c95..64fbc49913e 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -4443,6 +4443,17 @@ describe Project do end end + describe '#leave_pool_repository' do + let(:pool) { create(:pool_repository) } + let(:project) { create(:project, :repository, pool_repository: pool) } + + it 'removes the membership' do + project.leave_pool_repository + + expect(pool.member_projects.reload).not_to include(project) + end + end + def rugged_config rugged_repo(project.repository).config end |