Class: DaVinciPASTestKit::TokenEndpoint
- Inherits:
-
Inferno::DSL::SuiteEndpoint
- Object
- Inferno::DSL::SuiteEndpoint
- DaVinciPASTestKit::TokenEndpoint
- Defined in:
- lib/davinci_pas_test_kit/endpoints/token_endpoint.rb
Instance Method Summary collapse
Instance Method Details
#make_response ⇒ Object
11 12 13 14 15 16 |
# File 'lib/davinci_pas_test_kit/endpoints/token_endpoint.rb', line 11 def make_response # Placeholder for a more complete mock token endpoint response.status = 200 response.format = :json response.body = { access_token: SecureRandom.hex, token_type: 'bearer', expires_in: 300 }.to_json end |
#tags ⇒ Object
7 8 9 |
# File 'lib/davinci_pas_test_kit/endpoints/token_endpoint.rb', line 7 def [AUTH_TAG] end |
#test_run_identifier ⇒ Object
3 4 5 |
# File 'lib/davinci_pas_test_kit/endpoints/token_endpoint.rb', line 3 def test_run_identifier URI.decode_www_form(request.body.string).to_h['client_id'] end |
#update_result ⇒ Object
18 19 20 |
# File 'lib/davinci_pas_test_kit/endpoints/token_endpoint.rb', line 18 def update_result results_repo.update_result(result.id, 'pass') end |