diff options
Diffstat (limited to 'spec/finders/group_members_finder_spec.rb')
-rw-r--r-- | spec/finders/group_members_finder_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/finders/group_members_finder_spec.rb b/spec/finders/group_members_finder_spec.rb index 3238f6744f7..0d797b7923c 100644 --- a/spec/finders/group_members_finder_spec.rb +++ b/spec/finders/group_members_finder_spec.rb @@ -38,6 +38,12 @@ RSpec.describe GroupMembersFinder, '#execute' do } end + it 'raises an error if a non-supported relation type is used' do + expect do + described_class.new(group).execute(include_relations: [:direct, :invalid_relation_type]) + end.to raise_error(ArgumentError, "invalid_relation_type is not a valid relation type. Valid relation types are direct, inherited, descendants.") + end + using RSpec::Parameterized::TableSyntax where(:subject_relations, :subject_group, :expected_members) do |