projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
20470: Handle nil selection, selecting on writable_by
[arvados.git]
/
services
/
api
/
test
/
functional
/
user_sessions_controller_test.rb
diff --git
a/services/api/test/functional/user_sessions_controller_test.rb
b/services/api/test/functional/user_sessions_controller_test.rb
index 129464cf1c5dd5c9e5e3730aa4f9abf12565c2e2..66aff787bd78ecba8f5d897aa29c9d0a99265575 100644
(file)
--- a/
services/api/test/functional/user_sessions_controller_test.rb
+++ b/
services/api/test/functional/user_sessions_controller_test.rb
@@
-9,9
+9,8
@@
class UserSessionsControllerTest < ActionController::TestCase
test "redirect to joshid" do
api_client_page = 'http://client.example.com/home'
get :login, params: {return_to: api_client_page}
test "redirect to joshid" do
api_client_page = 'http://client.example.com/home'
get :login, params: {return_to: api_client_page}
- assert_response :redirect
- assert_equal("http://test.host/auth/joshid?return_to=%2Chttp%3A%2F%2Fclient.example.com%2Fhome", @response.redirect_url)
- assert_nil assigns(:api_client)
+ # Not supported any more
+ assert_response 404
end
test "send token when user is already logged in" do
end
test "send token when user is already logged in" do
@@
-30,6
+29,7
@@
class UserSessionsControllerTest < ActionController::TestCase
authorize_with :inactive
api_client_page = 'http://client.example.com/home'
get :login, params: {return_to: api_client_page}
authorize_with :inactive
api_client_page = 'http://client.example.com/home'
get :login, params: {return_to: api_client_page}
+ assert_response :redirect
assert_not_nil assigns(:api_client)
assert_nil assigns(:api_client_auth).expires_at
end
assert_not_nil assigns(:api_client)
assert_nil assigns(:api_client_auth).expires_at
end
@@
-40,6
+40,7
@@
class UserSessionsControllerTest < ActionController::TestCase
authorize_with :inactive
api_client_page = 'http://client.example.com/home'
get :login, params: {return_to: api_client_page}
authorize_with :inactive
api_client_page = 'http://client.example.com/home'
get :login, params: {return_to: api_client_page}
+ assert_response :redirect
assert_not_nil assigns(:api_client)
api_client_auth = assigns(:api_client_auth)
assert_in_delta(api_client_auth.expires_at,
assert_not_nil assigns(:api_client)
api_client_auth = assigns(:api_client_auth)
assert_in_delta(api_client_auth.expires_at,
@@
-105,9
+106,8
@@
class UserSessionsControllerTest < ActionController::TestCase
Rails.configuration.Login.LoginCluster = 'zzzzz'
api_client_page = 'http://client.example.com/home'
get :login, params: {return_to: api_client_page}
Rails.configuration.Login.LoginCluster = 'zzzzz'
api_client_page = 'http://client.example.com/home'
get :login, params: {return_to: api_client_page}
- assert_response :redirect
- assert_equal("http://test.host/auth/joshid?return_to=%2Chttp%3A%2F%2Fclient.example.com%2Fhome", @response.redirect_url)
- assert_nil assigns(:api_client)
+ # Doesn't redirect, just fail.
+ assert_response 404
end
test "controller cannot create session without SystemRootToken" do
end
test "controller cannot create session without SystemRootToken" do