X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1b7586c9288d694b2bc443d62f3c40502868ff77..4189e150f659915dcda7bb130cc2fa1a86afaf51:/test/integration/user_login_test.rb diff --git a/test/integration/user_login_test.rb b/test/integration/user_login_test.rb index 538c03999..b83b90acf 100644 --- a/test/integration/user_login_test.rb +++ b/test/integration/user_login_test.rb @@ -25,7 +25,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -36,7 +36,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login uppercase_user.email, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", uppercase_user.display_name end @@ -57,7 +57,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -66,7 +66,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email.upcase, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -75,7 +75,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email.titlecase, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -113,7 +113,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_template "login" assert_select "span.username", false - assert_select "div.flash.error", /your account has been suspended/ + assert_select "div.flash.error", /your account has been suspended/ do + assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + end end def test_login_email_password_suspended_upcase @@ -123,7 +125,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_template "login" assert_select "span.username", false - assert_select "div.flash.error", /your account has been suspended/ + assert_select "div.flash.error", /your account has been suspended/ do + assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + end end def test_login_email_password_suspended_titlecase @@ -133,7 +137,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_template "login" assert_select "span.username", false - assert_select "div.flash.error", /your account has been suspended/ + assert_select "div.flash.error", /your account has been suspended/ do + assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + end end def test_login_email_password_blocked @@ -176,7 +182,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -187,7 +193,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login uppercase_user.display_name, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", uppercase_user.display_name end @@ -208,7 +214,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -217,7 +223,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name.upcase, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -226,7 +232,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name.downcase, "test" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -264,7 +270,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_template "login" assert_select "span.username", false - assert_select "div.flash.error", /your account has been suspended/ + assert_select "div.flash.error", /your account has been suspended/ do + assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + end end def test_login_username_password_suspended_upcase @@ -274,7 +282,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_template "login" assert_select "span.username", false - assert_select "div.flash.error", /your account has been suspended/ + assert_select "div.flash.error", /your account has been suspended/ do + assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + end end def test_login_username_password_suspended_downcase @@ -284,7 +294,9 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_template "login" assert_select "span.username", false - assert_select "div.flash.error", /your account has been suspended/ + assert_select "div.flash.error", /your account has been suspended/ do + assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + end end def test_login_username_password_blocked @@ -322,7 +334,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email, "test", "yes" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name assert session.key?(:_remember_for) end @@ -332,7 +344,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name, "test", "yes" - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name assert session.key?(:_remember_for) end @@ -343,63 +355,32 @@ 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" - 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") - follow_redirect! + assert_template "users/login" + get auth_path(:provider => "openid", :openid_url => "http://localhost:1123/john.doe", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "openid", :openid_url => "http://localhost:1123/john.doe", :origin => "/login?referer=%2Fhistory", :referer => "/history") follow_redirect! assert_response :redirect follow_redirect! assert_response :success - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end - def test_login_openid_remember_me - user = create(:user, :auth_provider => "openid", :auth_uid => "http://example.com/john.doe") - OmniAuth.config.add_mock(:openid, :uid => user.auth_uid) - - get "/login", :params => { :referer => "/history" } - assert_response :redirect - assert_redirected_to :controller => :user, :action => :login, :cookie_test => true, :referer => "/history" - follow_redirect! - assert_response :success - assert_template "user/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") - follow_redirect! - assert_response :redirect - assert_redirected_to auth_success_path(:provider => "openid", :openid_url => user.auth_uid, :origin => "/login?referer=%2Fhistory", :referer => "/history") - follow_redirect! - assert_response :redirect - follow_redirect! - assert_response :success - assert_template "changeset/history" - assert_select "span.username", user.display_name - assert session.key?(:_remember_for) - end - def test_login_openid_connection_failed user = create(:user, :auth_provider => "openid", :auth_uid => "http://example.com/john.doe") OmniAuth.config.mock_auth[:openid] = :connection_failed 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" - 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") - follow_redirect! + assert_template "users/login" + get auth_path(:provider => "openid", :openid_url => user.auth_uid, :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "openid", :openid_url => user.auth_uid, :origin => "/login?referer=%2Fhistory", :referer => "/history") follow_redirect! @@ -420,14 +401,11 @@ 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" - 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") - follow_redirect! + assert_template "users/login" + get auth_path(:provider => "openid", :openid_url => user.auth_uid, :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "openid", :openid_url => user.auth_uid, :origin => "/login?referer=%2Fhistory", :referer => "/history") follow_redirect! @@ -447,21 +425,18 @@ 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" - 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") - follow_redirect! + assert_template "users/login" + get auth_path(:provider => "openid", :openid_url => "http://localhost:1123/fred.bloggs", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "openid", :openid_url => "http://localhost:1123/fred.bloggs", :origin => "/login?referer=%2Fhistory", :referer => "/history") follow_redirect! assert_response :redirect follow_redirect! assert_response :success - assert_template "user/new" + assert_template "users/new" assert_select "span.username", false end @@ -473,10 +448,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") @@ -484,7 +459,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -493,10 +468,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") @@ -517,10 +492,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") @@ -543,10 +518,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") @@ -554,7 +529,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 @@ -566,10 +541,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") @@ -577,7 +552,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name u = User.find_by(:display_name => user.display_name) @@ -591,10 +566,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") @@ -602,7 +577,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -611,10 +586,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") @@ -635,10 +610,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") @@ -659,10 +634,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") @@ -670,7 +645,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 @@ -680,10 +655,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") @@ -691,7 +666,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -700,10 +675,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") @@ -724,10 +699,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") @@ -748,10 +723,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") @@ -759,7 +734,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 @@ -769,10 +744,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") @@ -780,7 +755,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -789,10 +764,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") @@ -813,10 +788,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") @@ -837,10 +812,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") @@ -848,7 +823,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 @@ -858,10 +833,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") @@ -869,7 +844,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "changeset/history" + assert_template "changesets/history" assert_select "span.username", user.display_name end @@ -878,10 +853,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") @@ -902,10 +877,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") @@ -926,10 +901,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") @@ -937,7 +912,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 @@ -946,7 +921,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"