mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
DEV: Refactor API key specs to avoid hard-coding keys
By hard-coding keys, we are not testing the API key system end to end. This change also makes the specs more resilient to upcoming API key changes
This commit is contained in:
@ -56,7 +56,7 @@ describe 'rate limiter integration' do
|
||||
#request.set_header("action_dispatch.show_exceptions", true)
|
||||
|
||||
admin = Fabricate(:admin)
|
||||
api_key = Fabricate(:api_key, key: SecureRandom.hex, user: admin)
|
||||
api_key = Fabricate(:api_key, user: admin)
|
||||
|
||||
global_setting :max_admin_api_reqs_per_key_per_minute, 1
|
||||
|
||||
|
Reference in New Issue
Block a user