diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-12 18:09:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-12 18:09:58 +0300 |
commit | dc250651ab26bf7bce9205d5fa4a45dd58e2df81 (patch) | |
tree | 5d20546877fcc4f36897d4efebb96859e488f1b9 /spec/finders | |
parent | 2fe5ea34a5f63661a050404d3b5fbe3056a39765 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/finders')
-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 |