X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8e5deafd854b05086296513b318df1626dc41967..f2c57e0d71bbcb407ef43ee7c8c8458c76faeab6:/test/integration/user_login_test.rb?ds=inline diff --git a/test/integration/user_login_test.rb b/test/integration/user_login_test.rb index 509d2525c..21d8847ca 100644 --- a/test/integration/user_login_test.rb +++ b/test/integration/user_login_test.rb @@ -47,7 +47,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email.titlecase, "test" - assert_template "login" + assert_template "sessions/new" assert_select "span.username", false end @@ -111,10 +111,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email, "test" - assert_template "login" + assert_template "sessions/new" assert_select "span.username", false assert_select "div.flash.error", /your account has been suspended/ do - assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + assert_select "a[href='mailto:openstreetmap@example.com']", "support" end end @@ -123,10 +123,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email.upcase, "test" - assert_template "login" + assert_template "sessions/new" assert_select "span.username", false assert_select "div.flash.error", /your account has been suspended/ do - assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + assert_select "a[href='mailto:openstreetmap@example.com']", "support" end end @@ -135,10 +135,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.email.titlecase, "test" - assert_template "login" + assert_template "sessions/new" assert_select "span.username", false assert_select "div.flash.error", /your account has been suspended/ do - assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + assert_select "a[href='mailto:openstreetmap@example.com']", "support" end end @@ -204,7 +204,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name.downcase, "test" - assert_template "login" + assert_template "sessions/new" assert_select "span.username", false end @@ -268,10 +268,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name, "test" - assert_template "login" + assert_template "sessions/new" assert_select "span.username", false assert_select "div.flash.error", /your account has been suspended/ do - assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + assert_select "a[href='mailto:openstreetmap@example.com']", "support" end end @@ -280,10 +280,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name.upcase, "test" - assert_template "login" + assert_template "sessions/new" assert_select "span.username", false assert_select "div.flash.error", /your account has been suspended/ do - assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + assert_select "a[href='mailto:openstreetmap@example.com']", "support" end end @@ -292,10 +292,10 @@ class UserLoginTest < ActionDispatch::IntegrationTest try_password_login user.display_name.downcase, "test" - assert_template "login" + assert_template "sessions/new" assert_select "span.username", false assert_select "div.flash.error", /your account has been suspended/ do - assert_select "a[href='mailto:openstreetmap@example.com']", "webmaster" + assert_select "a[href='mailto:openstreetmap@example.com']", "support" end end @@ -358,7 +358,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path(:cookie_test => true, :referer => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post 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") @@ -379,7 +379,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path(:cookie_test => true, :referer => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post 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") @@ -390,7 +390,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Connection to authentication provider failed" assert_select "span.username", false end @@ -404,7 +404,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path(:cookie_test => true, :referer => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post 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") @@ -415,7 +415,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Invalid authentication credentials" assert_select "span.username", false end @@ -428,7 +428,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path(:cookie_test => true, :referer => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post 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") @@ -451,7 +451,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -471,7 +471,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -482,7 +482,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Connection to authentication provider failed" assert_select "span.username", false end @@ -495,7 +495,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -506,7 +506,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Invalid authentication credentials" assert_select "span.username", false end @@ -521,7 +521,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -544,7 +544,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "google", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") @@ -569,7 +569,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "facebook", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") @@ -589,7 +589,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "facebook", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") @@ -600,7 +600,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Connection to authentication provider failed" assert_select "span.username", false end @@ -613,7 +613,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "facebook", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") @@ -624,7 +624,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Invalid authentication credentials" assert_select "span.username", false end @@ -637,7 +637,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "facebook", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") @@ -658,7 +658,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "windowslive", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") @@ -678,7 +678,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "windowslive", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") @@ -689,7 +689,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Connection to authentication provider failed" assert_select "span.username", false end @@ -702,7 +702,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "windowslive", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") @@ -713,7 +713,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Invalid authentication credentials" assert_select "span.username", false end @@ -726,7 +726,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "windowslive", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") @@ -747,7 +747,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "github", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") @@ -767,7 +767,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "github", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") @@ -778,7 +778,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Connection to authentication provider failed" assert_select "span.username", false end @@ -791,7 +791,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "github", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") @@ -802,7 +802,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Invalid authentication credentials" assert_select "span.username", false end @@ -815,7 +815,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post auth_path(:provider => "github", :origin => "/login?referer=%2Fhistory", :referer => "/history") assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") @@ -836,7 +836,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post 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") @@ -856,7 +856,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post 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") @@ -867,7 +867,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Connection to authentication provider failed" assert_select "span.username", false end @@ -880,7 +880,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post 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") @@ -891,7 +891,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "div.flash.error", "Invalid authentication credentials" assert_select "span.username", false end @@ -904,7 +904,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path("cookie_test" => "true", "referer" => "/history") follow_redirect! assert_response :success - assert_template "users/login" + assert_template "sessions/new" post 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") @@ -924,7 +924,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_redirected_to login_path(:cookie_test => true) follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "input#username", 1 do assert_select "[value]", false end @@ -939,7 +939,7 @@ class UserLoginTest < ActionDispatch::IntegrationTest assert_response :redirect follow_redirect! assert_response :success - assert_template "login" + assert_template "sessions/new" assert_select "input#username", 1 do assert_select "[value=?]", username end