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
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
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",
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
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
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
end
# Check that the user can successfully recover their password
- def test_lost_password_recovery_success
- # Open the lost password form
- # Submit the lost password form
- # Check the e-mail
- # Submit the reset password token
- # Check that the password has changed, and the user can login
- end
+ # def test_lost_password_recovery_success
+ # Open the lost password form
+ # Submit the lost password form
+ # Check the e-mail
+ # Submit the reset password token
+ # Check that the password has changed, and the user can login
+ # end
def test_user_create_redirect
new_email = "redirect_tester@osm.org"
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
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
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
: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!
: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
: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!
: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
: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!
: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
: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",
: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
: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",
: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