]> git.openstreetmap.org Git - rails.git/blobdiff - test/integration/user_creation_test.rb
Rail 3 has renamed fieldWithErrors to field_with_errors
[rails.git] / test / integration / user_creation_test.rb
index 9cb5e895ccf4993f672f036d6da0352261ed6d4b..79772d4447aa28ddf6131a8a7939b9e48036411c 100644 (file)
@@ -9,7 +9,7 @@ class UserCreationTest < ActionController::IntegrationTest
 
   def test_create_user_form
     I18n.available_locales.each do |locale|
-      get '/user/new', {}, {"accept_language" => locale.to_s}
+      get '/user/new', {}, {"HTTP_ACCEPT_LANGUAGE" => locale.to_s}
       assert_response :success
       assert_template 'user/new'
     end
@@ -23,14 +23,14 @@ class UserCreationTest < ActionController::IntegrationTest
         assert_difference('ActionMailer::Base.deliveries.size', 0) do
           post '/user/save',
             {:user => { :email => dup_email, :email_confirmation => dup_email, :display_name => display_name, :pass_crypt => "testtest", :pass_crypt_confirmation => "testtest"}},
-            {"accept_language" => localer.to_s}
+            {"HTTP_ACCEPT_LANGUAGE" => localer.to_s}
         end
       end
       assert_response :success
       assert_template 'user/new'
       assert_equal response.headers['Content-Language'][0..1], localer.to_s[0..1] unless localer == :root
       assert_select "div#errorExplanation"
-      assert_select "table#signupForm > tr > td > div[class=fieldWithErrors] > input#user_email"
+      assert_select "table#signupForm > tr > td > div[class=field_with_errors] > input#user_email"
       assert_no_missing_translations
     end
   end
@@ -43,13 +43,13 @@ class UserCreationTest < ActionController::IntegrationTest
         assert_difference('ActionMailer::Base.deliveries.size', 0) do
           post '/user/save',
           {:user => {:email => email, :email_confirmation => email, :display_name => dup_display_name, :pass_crypt => "testtest", :pass_crypt_confirmation => "testtest"}},
-          {"accept_language" => locale.to_s}
+          {"HTTP_ACCEPT_LANGUAGE" => locale.to_s}
         end
       end
       assert_response :success
       assert_template 'user/new'
       assert_select "div#errorExplanation"
-      assert_select "table#signupForm > tr > td > div[class=fieldWithErrors] > input#user_display_name"
+      assert_select "table#signupForm > tr > td > div[class=field_with_errors] > input#user_display_name"
       assert_no_missing_translations
     end
   end
@@ -62,7 +62,7 @@ class UserCreationTest < ActionController::IntegrationTest
         assert_difference('ActionMailer::Base.deliveries.size', 1) do
           post_via_redirect "/user/save",
             {:user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :pass_crypt => "testtest", :pass_crypt_confirmation => "testtest"}},
-            {"accept_language" => "#{locale.to_s}"}
+            {"HTTP_ACCEPT_LANGUAGE" => "#{locale.to_s}"}
         end
       end