X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b3e4886cbbe195347179d0664621da9bc34e6170..64d7fc52356c128c367f18bcbe7a0c6f56a459a4:/services/api/test/integration/user_sessions_test.rb diff --git a/services/api/test/integration/user_sessions_test.rb b/services/api/test/integration/user_sessions_test.rb index 6e951499ad..76659f3207 100644 --- a/services/api/test/integration/user_sessions_test.rb +++ b/services/api/test/integration/user_sessions_test.rb @@ -15,21 +15,17 @@ class UserSessionsApiTest < ActionDispatch::IntegrationTest def mock_auth_with(email: nil, username: nil, identity_url: nil, remote: nil, expected_response: :redirect) mock = { - 'provider' => 'josh_id', - 'uid' => 'https://edward.example.com', - 'info' => { 'identity_url' => 'https://edward.example.com', 'name' => 'Edward Example', 'first_name' => 'Edward', 'last_name' => 'Example', - }, } - mock['info']['email'] = email unless email.nil? - mock['info']['username'] = username unless username.nil? - mock['info']['identity_url'] = identity_url unless identity_url.nil? - post('/auth/josh_id/callback', - params: {return_to: client_url(remote: remote)}, - headers: {'omniauth.auth' => mock}) + mock['email'] = email unless email.nil? + mock['username'] = username unless username.nil? + mock['identity_url'] = identity_url unless identity_url.nil? + post('/auth/controller/callback', + params: {return_to: client_url(remote: remote), :auth_info => SafeJSON.dump(mock)}, + headers: {'Authorization' => 'Bearer ' + Rails.configuration.SystemRootToken}) errors = { :redirect => 'Did not redirect to client with token',