- {return_to: client_url(remote: remote)},
- {'omniauth.auth' => mock})
- assert_response :redirect, 'Did not redirect to client with token'
+ params: {return_to: client_url(remote: remote)},
+ headers: {'omniauth.auth' => mock})
+
+ errors = {
+ :redirect => 'Did not redirect to client with token',
+ 400 => 'Did not return Bad Request error',
+ }
+ assert_response expected_response, errors[expected_response]