spec/support/fake_api.rb in finapps-3.0.5 vs spec/support/fake_api.rb in finapps-3.0.6
- old
+ new
@@ -75,15 +75,25 @@
put('/v3/institutions/refresh') { json_response 200, 'user_institution_refresh.json' }
# consumers
get('/v3/consumers/valid_public_id') { json_response 200, 'user.json' }
get('/v3/consumers/invalid_public_id') { json_response 404, 'resource_not_found.json' }
+ post('/v3/consumers') do
+ request.body.rewind
+ request_payload = JSON.parse request.body.read
+ if request_payload['password']
+ json_response 201, 'user.json'
+ else
+ json_response 400, 'invalid_request_body.json'
+ end
+ end
put('/v3/consumers/valid_public_id') { status 204 }
put('/v3/consumers/invalid_public_id') { json_response 400, 'invalid_user_id.json' }
put('/v3/consumers/valid_public_id/password') { json_response 200, 'user.json' }
put('/v3/consumers/invalid_public_id/password') { json_response 404, 'resource_not_found.json' }
delete('/v3/consumers/valid_public_id') { status 204 }
delete('/v3/consumers/invalid_public_id') { json_response 404, 'resource_not_found.json' }
+ post('/v3/logout') { status 204 }
# accounts
get('/v3/accounts/valid_id/statement/valid_id') { json_response 200, 'fake_pdf_statement.json' }
get('/v3/accounts/invalid_id/statement/valid_id') { json_response 404, 'resource_not_found.json' }