X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/32f86316712b8b781dfc2ffde0a5b88b742a6627..d6d0a2b1a61a0326bbb8eb3392e48b448ffa8d4f:/test/integration/user_roles_test.rb?ds=sidebyside diff --git a/test/integration/user_roles_test.rb b/test/integration/user_roles_test.rb index df8b1561f..0691edc8e 100644 --- a/test/integration/user_roles_test.rb +++ b/test/integration/user_roles_test.rb @@ -17,6 +17,11 @@ class UserRolesControllerTest < ActionController::IntegrationTest end def check_fail(action, user, role) + get '/login' + assert_response :redirect + assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true" + follow_redirect! + assert_response :success post '/login', {'user[email]' => users(user).email, 'user[password]' => "test", :referer => "/"} assert_response :redirect follow_redirect! @@ -30,6 +35,11 @@ class UserRolesControllerTest < ActionController::IntegrationTest end def check_success(action, user, role) + get '/login' + assert_response :redirect + assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true" + follow_redirect! + assert_response :success post '/login', {'user[email]' => users(user).email, 'user[password]' => "test", :referer => "/"} assert_response :redirect follow_redirect!