Class: DaVinciDTRTestKit::MockAuthorization::SimpleTokenEndpoint
- Inherits:
-
Inferno::DSL::SuiteEndpoint
- Object
- Inferno::DSL::SuiteEndpoint
- DaVinciDTRTestKit::MockAuthorization::SimpleTokenEndpoint
- Defined in:
- lib/davinci_dtr_test_kit/endpoints/mock_authorization/simple_token_endpoint.rb
Instance Method Summary collapse
-
#make_response ⇒ Object
Placeholder for a more complete mock token endpoint.
- #test_run_identifier ⇒ Object
- #update_result ⇒ Object
Instance Method Details
#make_response ⇒ Object
Placeholder for a more complete mock token endpoint
9 10 11 12 |
# File 'lib/davinci_dtr_test_kit/endpoints/mock_authorization/simple_token_endpoint.rb', line 9 def make_response response.body = { access_token: SecureRandom.hex, token_type: 'bearer', expires_in: 3600 }.to_json response.status = 200 end |
#test_run_identifier ⇒ Object
4 5 6 |
# File 'lib/davinci_dtr_test_kit/endpoints/mock_authorization/simple_token_endpoint.rb', line 4 def test_run_identifier request.params[:client_id] end |
#update_result ⇒ Object
14 15 16 |
# File 'lib/davinci_dtr_test_kit/endpoints/mock_authorization/simple_token_endpoint.rb', line 14 def update_result results_repo.update_result(result.id, 'pass') end |