spec/support/fake_api.rb in finapps-6.0.0 vs spec/support/fake_api.rb in finapps-6.1.0
- old
+ new
@@ -356,9 +356,20 @@
else
json_response 400, 'invalid_request_body.json'
end
end
+ # operators login tokens
+ post("/#{version}/login/operators/token") do
+ request.body.rewind
+ request_payload = JSON.parse request.body.read
+ if request_payload['params'] == 'valid'
+ json_response 200, 'operator_login_token.json'
+ else
+ json_response 400, 'invalid_request_body.json'
+ end
+ end
+
# session
post("/#{version}/login") do
request.body.rewind
request_payload = JSON.parse request.body.read
if request_payload['password'] == 'valid_password'