mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
DEV: Use response.parsed_body
in specs (#9615)
Most of it was autofixed with rubocop-discourse 2.1.1.
This commit is contained in:
@ -255,7 +255,7 @@ describe UserApiKeysController do
|
||||
SiteSetting.min_trust_level_for_user_api_key = 0
|
||||
post "/user-api-key.json", params: args
|
||||
expect(response.status).not_to eq(302)
|
||||
payload = JSON.parse(response.body)["payload"]
|
||||
payload = response.parsed_body["payload"]
|
||||
encrypted = Base64.decode64(payload)
|
||||
key = OpenSSL::PKey::RSA.new(private_key)
|
||||
parsed = JSON.parse(key.private_decrypt(encrypted))
|
||||
|
Reference in New Issue
Block a user