diff options
Diffstat (limited to 'spec/finders/fork_targets_finder_spec.rb')
-rw-r--r-- | spec/finders/fork_targets_finder_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/finders/fork_targets_finder_spec.rb b/spec/finders/fork_targets_finder_spec.rb index 7208f46cfff..12f01227af8 100644 --- a/spec/finders/fork_targets_finder_spec.rb +++ b/spec/finders/fork_targets_finder_spec.rb @@ -35,5 +35,13 @@ RSpec.describe ForkTargetsFinder do it 'returns all user manageable namespaces' do expect(finder.execute).to match_array([user.namespace, maintained_group, owned_group, project.namespace]) end + + it 'returns only groups when only_groups option is passed' do + expect(finder.execute(only_groups: true)).to match_array([maintained_group, owned_group, project.namespace]) + end + + it 'returns groups relation when only_groups option is passed' do + expect(finder.execute(only_groups: true)).to include(a_kind_of(Group)) + end end end |