require "test_helper"
class UserCreationTest < ActionDispatch::IntegrationTest
- fixtures :users
-
def setup
I18n.locale = "en"
def test_user_create_submit_duplicate_email
I18n.available_locales.each do |locale|
- dup_email = users(:public_user).email
+ dup_email = create(:user).email
display_name = "#{locale}_new_tester"
assert_difference("User.count", 0) do
assert_difference("ActionMailer::Base.deliveries.size", 0) do
def test_user_create_submit_duplicate_username
I18n.available_locales.each do |locale|
- dup_display_name = users(:public_user).display_name
+ dup_display_name = create(:user).display_name
email = "#{locale}_new_tester"
assert_difference("User.count", 0) do
assert_difference("ActionMailer::Base.deliveries.size", 0) do
assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new")
follow_redirect!
assert_response :redirect
- assert_redirected_to auth_success_path(:provider => "windowslive", :origin => "/user/new")
+ assert_redirected_to auth_success_path(:provider => "windowslive")
follow_redirect!
assert_response :redirect
assert_redirected_to "/user/terms"
assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new")
follow_redirect!
assert_response :redirect
- assert_redirected_to auth_success_path(:provider => "windowslive", :origin => "/user/new")
+ assert_redirected_to auth_success_path(:provider => "windowslive")
follow_redirect!
assert_response :redirect
assert_redirected_to auth_failure_path(:strategy => "windowslive", :message => "connection_failed", :origin => "/user/new")
assert_redirected_to auth_path(:provider => "windowslive", :origin => "/user/new")
follow_redirect!
assert_response :redirect
- assert_redirected_to auth_success_path(:provider => "windowslive", :origin => "/user/new")
+ assert_redirected_to auth_success_path(:provider => "windowslive")
follow_redirect!
assert_response :redirect
assert_redirected_to "/user/terms"