about summary refs log tree commit diff
path: root/spec/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-12-09 14:20:02 +0100
committerGitHub <noreply@github.com>2017-12-09 14:20:02 +0100
commita865b62efc0f7025f789f4413a03ccacd57db7bb (patch)
treefd5e9a005e7788b906129ea2f57b480b77a1f056 /spec/controllers
parent84cebad49d388a807bfc1f09cad825c6b9469883 (diff)
Rate limit by user instead of IP when API user is authenticated (#5923)
* Fix #668 - Rate limit by user instead of IP when API user is authenticated

* Fix code style issue

* Use request decorator provided by Doorkeeper
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/concerns/rate_limit_headers_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/controllers/concerns/rate_limit_headers_spec.rb b/spec/controllers/concerns/rate_limit_headers_spec.rb
index 719978dc2..00a9a2080 100644
--- a/spec/controllers/concerns/rate_limit_headers_spec.rb
+++ b/spec/controllers/concerns/rate_limit_headers_spec.rb
@@ -34,7 +34,7 @@ describe ApplicationController do
       let(:start_time) { DateTime.new(2017, 1, 1, 12, 0, 0).utc }
 
       before do
-        request.env['rack.attack.throttle_data'] = { 'api' => { limit: 100, count: 20, period: 10 } }
+        request.env['rack.attack.throttle_data'] = { 'throttle_authenticated_api' => { limit: 100, count: 20, period: 10 } }
         travel_to start_time do
           get 'show'
         end