Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/autocomplete_controller_spec.rb')
-rw-r--r--spec/controllers/autocomplete_controller_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/autocomplete_controller_spec.rb b/spec/controllers/autocomplete_controller_spec.rb
index c2eb9d54303..6ccba866ebb 100644
--- a/spec/controllers/autocomplete_controller_spec.rb
+++ b/spec/controllers/autocomplete_controller_spec.rb
@@ -234,6 +234,18 @@ RSpec.describe AutocompleteController do
expect(json_response.first).to have_key('can_merge')
end
end
+
+ it_behaves_like 'rate limited endpoint', rate_limit_key: :user_email_lookup do
+ let(:current_user) { user }
+
+ def request
+ get(:users, params: { search: 'foo@bar.com' })
+ end
+
+ before do
+ sign_in(current_user)
+ end
+ end
end
context 'GET projects' do