spec/support/fake_onfido_api.rb in onfido-0.5.0 vs spec/support/fake_onfido_api.rb in onfido-0.6.0

- old
+ new

@@ -29,14 +29,23 @@ post '/v2/applicants/:id/checks' do json_response(201, 'check.json') end get '/v2/applicants/:id/checks/:id' do - json_response(200, 'check.json') + if params["expand"] == "reports" + json_response(200, "check_with_expanded_reports.json") + else + json_response(200, "check.json") + end end get '/v2/applicants/:id/checks' do - response = json_response(200, 'checks.json') + response = if params["expand"] == "reports" + json_response(200, "checks_with_expanded_reports.json") + else + json_response(200, "checks.json") + end + { checks: JSON.parse(response)['checks'][pagination_range] }.to_json end get '/v2/checks/:id/reports' do json_response(200, 'reports.json')