Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/group_group_link_spec.rb')
-rw-r--r--spec/models/group_group_link_spec.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/spec/models/group_group_link_spec.rb b/spec/models/group_group_link_spec.rb
index 03cc9d7e64c..034a5c1dfc6 100644
--- a/spec/models/group_group_link_spec.rb
+++ b/spec/models/group_group_link_spec.rb
@@ -29,32 +29,6 @@ RSpec.describe GroupGroupLink do
])
end
end
-
- describe '.public_or_visible_to_user' do
- let!(:user_with_access) { create :user }
- let!(:user_without_access) { create :user }
- let!(:shared_with_group) { create :group, :private }
- let!(:shared_group) { create :group }
- let!(:private_group_group_link) { create(:group_group_link, shared_group: shared_group, shared_with_group: shared_with_group) }
-
- before do
- shared_group.add_owner(user_with_access)
- shared_group.add_owner(user_without_access)
- shared_with_group.add_developer(user_with_access)
- end
-
- context 'when user can access shared group' do
- it 'returns the private group' do
- expect(described_class.public_or_visible_to_user(shared_group, user_with_access)).to include(private_group_group_link)
- end
- end
-
- context 'when user does not have access to shared group' do
- it 'does not return private group' do
- expect(described_class.public_or_visible_to_user(shared_group, user_without_access)).not_to include(private_group_group_link)
- end
- end
- end
end
describe 'validation' do