X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/721f8e00b287974d6346e3c62bb8d0d599cc7db3..07965246f80a65dde8ce1962da0e177985b6fb73:/test/integration/user_creation_test.rb diff --git a/test/integration/user_creation_test.rb b/test/integration/user_creation_test.rb index f75fde75e..5d75c508d 100644 --- a/test/integration/user_creation_test.rb +++ b/test/integration/user_creation_test.rb @@ -30,12 +30,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_difference("User.count", 0) do assert_difference("ActionMailer::Base.deliveries.size", 0) do perform_enqueued_jobs do - post "/user/new", + post "/user", :params => { :user => { :email => dup_email, :display_name => display_name, :pass_crypt => "testtest", - :pass_crypt_confirmation => "testtest", - :consider_pd => "1" } } + :pass_crypt_confirmation => "testtest" } } end end end @@ -51,14 +50,13 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_difference("User.count", 0) do assert_no_difference("ActionMailer::Base.deliveries.size") do perform_enqueued_jobs do - post "/user/new", + post "/user", :params => { :user => { :email => dup_email, :display_name => display_name, :pass_crypt => "testtest", :pass_crypt_confirmation => "testtest", :auth_provider => "google", - :auth_uid => "123454321", - :consider_pd => "1" } } + :auth_uid => "123454321" } } end end end @@ -74,7 +72,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_difference("User.count", 0) do assert_difference("ActionMailer::Base.deliveries.size", 0) do perform_enqueued_jobs do - post "/user/new", + post "/user", :params => { :user => { :email => email, :display_name => dup_display_name, :pass_crypt => "testtest", @@ -93,12 +91,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_difference("User.count", 0) do assert_difference("ActionMailer::Base.deliveries.size", 0) do perform_enqueued_jobs do - post "/user/new", + post "/user", :params => { :user => { :email => email, :display_name => display_name, :pass_crypt => "testtest", - :pass_crypt_confirmation => "blahblah", - :consider_pd => "1" } } + :pass_crypt_confirmation => "blahblah" } } end end end @@ -113,12 +110,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_difference("User.count", 0) do assert_no_difference("ActionMailer::Base.deliveries.size") do perform_enqueued_jobs do - post "/user/new", + post "/user", :params => { :user => { :email => email, :display_name => dup_display_name, :auth_provider => "google", - :auth_uid => "123454321", - :consider_pd => "1" } } + :auth_uid => "123454321" } } end end end @@ -134,12 +130,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_difference("User.count", 1) do assert_difference("ActionMailer::Base.deliveries.size", 1) do perform_enqueued_jobs do - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :pass_crypt => "testtest", - :pass_crypt_confirmation => "testtest", - :consider_pd => "1" } } + :pass_crypt_confirmation => "testtest" } } assert_redirected_to :controller => :confirmations, :action => :confirm, :display_name => display_name follow_redirect! end @@ -188,12 +183,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_difference("User.count") do assert_difference("ActionMailer::Base.deliveries.size", 1) do perform_enqueued_jobs do - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :pass_crypt => password, - :pass_crypt_confirmation => password, - :consider_pd => "1" }, + :pass_crypt_confirmation => password }, :referer => referer } assert_response(:redirect) assert_redirected_to :controller => :confirmations, :action => :confirm, :display_name => display_name @@ -250,12 +244,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_redirected_to :controller => :users, :action => "new", :nickname => display_name, :email => new_email, :auth_provider => "openid", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :auth_provider => "openid", - :auth_uid => auth_uid, - :consider_pd => "1" } } + :auth_uid => auth_uid } } end end end @@ -326,12 +319,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest assert_redirected_to :controller => :users, :action => "new", :nickname => display_name, :email => new_email, :auth_provider => "openid", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :auth_provider => "openid", - :auth_uid => auth_uid, - :consider_pd => "1" } } + :auth_uid => auth_uid } } follow_redirect! end end @@ -388,12 +380,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest :auth_provider => "google", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :auth_provider => "google", - :auth_uid => auth_uid, - :consider_pd => "1" }, + :auth_uid => auth_uid }, :email_hmac => email_hmac } assert_redirected_to welcome_path follow_redirect! @@ -474,13 +465,12 @@ class UserCreationTest < ActionDispatch::IntegrationTest :email => orig_email, :email_hmac => email_hmac, :auth_provider => "google", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :email_hmac => email_hmac, :display_name => display_name, :auth_provider => "google", - :auth_uid => auth_uid, - :consider_pd => "1" } } + :auth_uid => auth_uid } } assert_response :redirect follow_redirect! end @@ -537,12 +527,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest :auth_provider => "facebook", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :auth_provider => "facebook", - :auth_uid => auth_uid, - :consider_pd => "1" }, + :auth_uid => auth_uid }, :email_hmac => email_hmac } assert_redirected_to welcome_path follow_redirect! @@ -623,13 +612,12 @@ class UserCreationTest < ActionDispatch::IntegrationTest :auth_provider => "facebook", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :email_hmac => email_hmac, :display_name => display_name, :auth_provider => "facebook", - :auth_uid => auth_uid, - :consider_pd => "1" } } + :auth_uid => auth_uid } } assert_response :redirect follow_redirect! end @@ -685,12 +673,11 @@ class UserCreationTest < ActionDispatch::IntegrationTest :email => new_email, :email_hmac => email_hmac, :auth_provider => "microsoft", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :auth_provider => "microsoft", - :auth_uid => auth_uid, - :consider_pd => "1" }, + :auth_uid => auth_uid }, :email_hmac => email_hmac } assert_redirected_to welcome_path follow_redirect! @@ -770,13 +757,12 @@ class UserCreationTest < ActionDispatch::IntegrationTest :auth_provider => "microsoft", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :email_hmac => email_hmac, :display_name => display_name, :auth_provider => "microsoft", - :auth_uid => auth_uid, - :consider_pd => "1" } } + :auth_uid => auth_uid } } assert_response :redirect follow_redirect! end @@ -834,7 +820,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :auth_provider => "github", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :auth_provider => "github", @@ -921,13 +907,12 @@ class UserCreationTest < ActionDispatch::IntegrationTest :email => orig_email, :email_hmac => email_hmac, :auth_provider => "github", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :email_hmac => email_hmac, :display_name => display_name, :auth_provider => "github", - :auth_uid => auth_uid, - :consider_pd => "1" } } + :auth_uid => auth_uid } } assert_response :redirect follow_redirect! end @@ -984,7 +969,7 @@ class UserCreationTest < ActionDispatch::IntegrationTest :email => new_email, :email_hmac => email_hmac, :auth_provider => "wikipedia", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :display_name => display_name, :auth_provider => "wikipedia", @@ -1071,13 +1056,12 @@ class UserCreationTest < ActionDispatch::IntegrationTest :auth_provider => "wikipedia", :auth_uid => auth_uid follow_redirect! - post "/user/new", + post "/user", :params => { :user => { :email => new_email, :email_hmac => email_hmac, :display_name => display_name, :auth_provider => "wikipedia", - :auth_uid => auth_uid, - :consider_pd => "1" } } + :auth_uid => auth_uid } } assert_response :redirect follow_redirect! end