summaryrefslogtreecommitdiff
path: root/spec/finders/groups_finder_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/finders/groups_finder_spec.rb')
-rw-r--r--spec/finders/groups_finder_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/finders/groups_finder_spec.rb b/spec/finders/groups_finder_spec.rb
index 10a08d7326e..a4cbee6a124 100644
--- a/spec/finders/groups_finder_spec.rb
+++ b/spec/finders/groups_finder_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe GroupsFinder do
include AdminModeHelper
- describe '#execute' do
+ shared_examples '#execute' do
let(:user) { create(:user) }
describe 'root level groups' do
@@ -20,6 +20,7 @@ RSpec.describe GroupsFinder do
user_private_group)
:regular | { all_available: false } | %i(user_public_group user_internal_group user_private_group)
:regular | {} | %i(public_group internal_group user_public_group user_internal_group user_private_group)
+ :regular | { min_access_level: Gitlab::Access::DEVELOPER } | %i(user_public_group user_internal_group user_private_group)
:external | { all_available: true } | %i(public_group user_public_group user_internal_group user_private_group)
:external | { all_available: false } | %i(user_public_group user_internal_group user_private_group)
@@ -261,4 +262,16 @@ RSpec.describe GroupsFinder do
end
end
end
+
+ describe '#execute' do
+ include_examples '#execute'
+
+ context 'when use_traversal_ids_groups_finder feature flags is disabled' do
+ before do
+ stub_feature_flags(use_traversal_ids_groups_finder: false)
+ end
+
+ include_examples '#execute'
+ end
+ end
end