diff --git a/lib/davinci_dtr_test_kit/endpoints/mock_ehr.rb b/lib/davinci_dtr_test_kit/endpoints/mock_ehr.rb index 1fb7424..fba96ba 100644 --- a/lib/davinci_dtr_test_kit/endpoints/mock_ehr.rb +++ b/lib/davinci_dtr_test_kit/endpoints/mock_ehr.rb @@ -14,9 +14,9 @@ def resource_server_client def metadata(_env) cs = resource_server_client.capability_statement if cs.present? - [200, RESPONSE_HEADERS, [cs.to_json]] + [200, { 'Content-Type' => 'application/json', 'Access-Control-Allow-Origin' => '*' }, [cs.to_json]] else - [500, {}, ['Unexpected error occurred while fetching metadata']] + [500, { 'Access-Control-Allow-Origin' => '*' }, ['Unexpected error occurred while fetching metadata']] end end end diff --git a/lib/davinci_dtr_test_kit/endpoints/mock_ehr/questionnaire_response_endpoint.rb b/lib/davinci_dtr_test_kit/endpoints/mock_ehr/questionnaire_response_endpoint.rb index b71eeab..1f01e93 100644 --- a/lib/davinci_dtr_test_kit/endpoints/mock_ehr/questionnaire_response_endpoint.rb +++ b/lib/davinci_dtr_test_kit/endpoints/mock_ehr/questionnaire_response_endpoint.rb @@ -11,7 +11,7 @@ def make_response response.status = 201 response.format = :json response['Access-Control-Allow-Origin'] = '*' - response.body = request.body + response.body = request.body.string end def update_result diff --git a/lib/davinci_dtr_test_kit/ext/inferno_core/runnable.rb b/lib/davinci_dtr_test_kit/ext/inferno_core/runnable.rb index 7b97ae2..8dd8973 100644 --- a/lib/davinci_dtr_test_kit/ext/inferno_core/runnable.rb +++ b/lib/davinci_dtr_test_kit/ext/inferno_core/runnable.rb @@ -1,5 +1,3 @@ -require_relative 'record_response_route' - module Inferno module DSL module Runnable diff --git a/spec/davinci_dtr_test_kit/dtr_payer_server_questionnaire_package_group_static_request_spec.rb b/spec/davinci_dtr_test_kit/dtr_payer_server_questionnaire_package_group_static_request_spec.rb index d4f7812..57012b4 100644 --- a/spec/davinci_dtr_test_kit/dtr_payer_server_questionnaire_package_group_static_request_spec.rb +++ b/spec/davinci_dtr_test_kit/dtr_payer_server_questionnaire_package_group_static_request_spec.rb @@ -133,8 +133,6 @@ post(questionnaire_package_url, request_body_conformant) expect(last_response.ok?).to be(true) - get(resume_pass_url) - result = results_repo.find(result.id) expect(result.result).to eq('pass') end