X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/60f2074baca1b36bf02b02be976a2527d60c5fef..f8f7ab15685403a2b440723f83fdd8451488c908:/test/integration/user_login_test.rb diff --git a/test/integration/user_login_test.rb b/test/integration/user_login_test.rb index 2c3e61be6..feaa92065 100644 --- a/test/integration/user_login_test.rb +++ b/test/integration/user_login_test.rb @@ -355,10 +355,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :user, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" post "/login", :params => { :openid_url => "http://localhost:1123/john.doe", :referer => "/history" } assert_response :redirect assert_redirected_to auth_path(:provider => "openid", :openid_url => "http://localhost:1123/john.doe", :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -379,10 +379,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :user, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" post "/login", :params => { :openid_url => user.auth_uid, :remember_me_openid => true, :referer => "/history" } assert_response :redirect assert_redirected_to auth_path(:provider => "openid", :openid_url => user.auth_uid, :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -404,10 +404,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :user, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" post "/login", :params => { :openid_url => user.auth_uid, :referer => "/history" } assert_response :redirect assert_redirected_to auth_path(:provider => "openid", :openid_url => user.auth_uid, :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -432,10 +432,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :user, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" post "/login", :params => { :openid_url => user.auth_uid, :referer => "/history" } assert_response :redirect assert_redirected_to auth_path(:provider => "openid", :openid_url => user.auth_uid, :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -459,10 +459,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to :controller => :user, :action => :login, :cookie_test => true, :referer => "/history" + assert_redirected_to :controller => :users, :action => :login, :cookie_test => true, :referer => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" post "/login", :params => { :openid_url => "http://localhost:1123/fred.bloggs", :referer => "/history" } assert_response :redirect assert_redirected_to auth_path(:provider => "openid", :openid_url => "http://localhost:1123/fred.bloggs", :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -473,7 +473,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "user/new" + assert_template "users/new" assert_select "span.username", false end @@ -485,10 +485,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -505,10 +505,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -529,10 +529,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -555,10 +555,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -566,7 +566,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "user/new" + assert_template "users/new" assert_select "span.username", false end @@ -578,10 +578,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -603,10 +603,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "facebook", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") @@ -623,10 +623,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "facebook", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") @@ -647,10 +647,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "facebook", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") @@ -671,10 +671,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "facebook", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") @@ -682,7 +682,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "user/new" + assert_template "users/new" assert_select "span.username", false end @@ -692,10 +692,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "windowslive", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") @@ -712,10 +712,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "windowslive", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") @@ -736,10 +736,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "windowslive", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") @@ -760,10 +760,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "windowslive", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") @@ -771,7 +771,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "user/new" + assert_template "users/new" assert_select "span.username", false end @@ -781,10 +781,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "github", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") @@ -801,10 +801,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "github", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") @@ -825,10 +825,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "github", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") @@ -849,10 +849,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "github", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") @@ -860,7 +860,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "user/new" + assert_template "users/new" assert_select "span.username", false end @@ -870,10 +870,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -890,10 +890,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -914,10 +914,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -938,10 +938,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest get "/login", :params => { :referer => "/history" } assert_response :redirect - assert_redirected_to "controller" => "user", "action" => "login", "cookie_test" => "true", "referer" => "/history" + assert_redirected_to "controller" => "users", "action" => "login", "cookie_test" => "true", "referer" => "/history" follow_redirect! assert_response :success - assert_template "user/login" + assert_template "users/login" get auth_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/login?referer=%2Fhistory", :referer => "/history") @@ -949,7 +949,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "user/new" + assert_template "users/new" assert_select "span.username", false end @@ -958,7 +958,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest def try_password_login(username, password, remember_me = nil) get "/login" assert_response :redirect - assert_redirected_to :controller => :user, :action => :login, :cookie_test => true + assert_redirected_to :controller => :users, :action => :login, :cookie_test => true follow_redirect! assert_response :success assert_template "login"