+ def test_user_create_no_tou_failure
+ I18n.available_locales.each do |locale|
+ new_email = "#{locale}newtester@osm.org"
+ display_name = "#{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 => new_email,
+ :email_confirmation => new_email,
+ :display_name => display_name,
+ :pass_crypt => "testtest",
+ :pass_crypt_confirmation => "testtest" } }
+ end
+ end
+ end
+
+ assert_redirected_to "/user/terms"
+
+ perform_enqueued_jobs do
+ post "/user/save",
+ :headers => { "HTTP_ACCEPT_LANGUAGE" => locale.to_s }
+ assert_redirected_to "/user/terms"
+ end
+
+ ActionMailer::Base.deliveries.clear
+ end
+ end
+