Method: GdsApi::TestHelpers::AccountApi#stub_account_api_get_end_session_url
- Defined in:
- lib/gds_api/test_helpers/account_api.rb
#stub_account_api_get_end_session_url(govuk_account_session: nil, end_session_uri: "http://auth/provider") ⇒ Object
GET /api/oauth2/end-session
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/gds_api/test_helpers/account_api.rb', line 52 def stub_account_api_get_end_session_url(govuk_account_session: nil, end_session_uri: "http://auth/provider") if govuk_account_session stub_request(:get, "#{ACCOUNT_API_ENDPOINT}/api/oauth2/end-session") .with(headers: { GdsApi::AccountApi::AUTH_HEADER_NAME => govuk_account_session }) .to_return( status: 200, body: { end_session_uri: }.to_json, ) else stub_request(:get, "#{ACCOUNT_API_ENDPOINT}/api/oauth2/end-session") .to_return( status: 200, body: { end_session_uri: }.to_json, ) end end |