diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 14:28:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 14:28:54 +0300 |
commit | 41fd6d4d38aaef723e501ff3ab38ae63e31d4efb (patch) | |
tree | 65f9e06d467a90b39cfc7ea6debc3864d219f7cb /spec/finders | |
parent | abbf44bd6cfb29413b3cf5768b691e5b222b89ea (diff) |
Add latest changes from gitlab-org/security/gitlab@14-7-stable-ee
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/users_finder_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/finders/users_finder_spec.rb b/spec/finders/users_finder_spec.rb index b0f8b803141..fab48cf3178 100644 --- a/spec/finders/users_finder_spec.rb +++ b/spec/finders/users_finder_spec.rb @@ -39,6 +39,12 @@ RSpec.describe UsersFinder do expect(users).to contain_exactly(blocked_user) end + it 'does not filter by private emails search' do + users = described_class.new(user, search: normal_user.email).execute + + expect(users).to be_empty + end + it 'filters by blocked users' do users = described_class.new(user, blocked: true).execute @@ -135,6 +141,12 @@ RSpec.describe UsersFinder do expect(users).to contain_exactly(normal_user) end + + it 'filters by private emails search' do + users = described_class.new(admin, search: normal_user.email).execute + + expect(users).to contain_exactly(normal_user) + end end end end |