- I18n.available_locales.each do |locale|
- 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
- perform_enqueued_jobs do
- post "/user/new",
- :params => { :user => { :email => email, :email_confirmation => email, :display_name => dup_display_name, :pass_crypt => "testtest", :pass_crypt_confirmation => "testtest" } },
- :headers => { "HTTP_ACCEPT_LANGUAGE" => locale.to_s }
+ I18n.with_locale "en" do
+ I18n.available_locales.each do |locale|
+ 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
+ perform_enqueued_jobs do
+ post "/user/new",
+ :params => { :user => { :email => email,
+ :email_confirmation => email,
+ :display_name => dup_display_name,
+ :pass_crypt => "testtest",
+ :pass_crypt_confirmation => "testtest" } },
+ :headers => { "HTTP_ACCEPT_LANGUAGE" => locale.to_s }
+ end