X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/da2277505faa4b327df7bd0dd03aaf6317e77c11..dbf35e0cf67ee330cd02c2431e0ed6d08681d184:/test/integration/user_creation_test.rb?ds=sidebyside diff --git a/test/integration/user_creation_test.rb b/test/integration/user_creation_test.rb index 8b6b3ef3c..a39e423c0 100644 --- a/test/integration/user_creation_test.rb +++ b/test/integration/user_creation_test.rb @@ -51,7 +51,8 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_response :success assert_template "users/new" assert_equal locale.to_s, response.headers["Content-Language"] - assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_email" + assert_select "form" + assert_select "form > div.form-group > input.is-invalid#user_email" assert_no_missing_translations end end @@ -75,7 +76,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest end assert_response :success assert_template "users/new" - assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_display_name" + assert_select "form > div.form-group > input.is-invalid#user_display_name" assert_no_missing_translations end end @@ -120,7 +121,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear end @@ -207,14 +208,14 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear # Go to the confirmation page get "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" post "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :redirect @@ -242,7 +243,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new") follow_redirect! @@ -265,7 +266,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear end @@ -288,7 +289,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new") follow_redirect! @@ -327,7 +328,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :referer => referer } assert_response :redirect assert_redirected_to auth_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new") follow_redirect! @@ -360,14 +361,14 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear # Go to the confirmation page get "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" post "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :redirect @@ -396,7 +397,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "google", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") follow_redirect! @@ -419,7 +420,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear end @@ -441,7 +442,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "google", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") follow_redirect! @@ -481,7 +482,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :referer => referer } assert_response :redirect assert_redirected_to auth_path(:provider => "google", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "google") follow_redirect! @@ -514,14 +515,14 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear # Go to the confirmation page get "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" post "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :redirect @@ -548,7 +549,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "facebook", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") follow_redirect! @@ -571,7 +572,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear end @@ -593,7 +594,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "facebook", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") follow_redirect! @@ -631,7 +632,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :referer => referer } assert_response :redirect assert_redirected_to auth_path(:provider => "facebook", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "facebook") follow_redirect! @@ -664,14 +665,14 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear # Go to the confirmation page get "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" post "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :redirect @@ -698,7 +699,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") follow_redirect! @@ -721,7 +722,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear end @@ -743,7 +744,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") follow_redirect! @@ -781,7 +782,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :referer => referer } assert_response :redirect assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "windowslive") follow_redirect! @@ -814,14 +815,14 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear # Go to the confirmation page get "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" post "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :redirect @@ -848,7 +849,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "github", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") follow_redirect! @@ -872,7 +873,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear end @@ -894,7 +895,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "github", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") follow_redirect! @@ -932,7 +933,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :referer => referer } assert_response :redirect assert_redirected_to auth_path(:provider => "github", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "github") follow_redirect! @@ -966,14 +967,14 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear # Go to the confirmation page get "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" post "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :redirect @@ -1000,7 +1001,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new") follow_redirect! @@ -1024,7 +1025,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear end @@ -1046,7 +1047,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :pass_crypt_confirmation => "" } } assert_response :redirect assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new") follow_redirect! @@ -1084,7 +1085,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :referer => referer } assert_response :redirect assert_redirected_to auth_path(:provider => "wikipedia", :origin => "/user/new") - follow_redirect! + post response.location assert_response :redirect assert_redirected_to auth_success_path(:provider => "wikipedia", :origin => "/user/new") follow_redirect! @@ -1118,14 +1119,14 @@ class UserCreationTest < ActionDispatch::IntegrationTest # Check the page assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" ActionMailer::Base.deliveries.clear # Go to the confirmation page get "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :success - assert_template "users/confirm" + assert_template "confirmations/confirm" post "/user/#{display_name}/confirm", :params => { :confirm_string => confirm_string } assert_response :redirect