]> git.openstreetmap.org Git - rails.git/blobdiff - test/unit/user_test.rb
Bounding boxes are sanitised on creation now
[rails.git] / test / unit / user_test.rb
index e537a8433aa97038c984dc7e189c385943980394..843c3190556724533757f73af2095e3254b1b89e 100644 (file)
@@ -48,13 +48,13 @@ class UserTest < ActiveSupport::TestCase
     ok.each do |name|
       user = users(:normal_user)
       user.email = name
     ok.each do |name|
       user = users(:normal_user)
       user.email = name
-      assert user.valid?, user.errors.full_messages
+      assert user.valid?(:save), user.errors.full_messages
     end
     
     bad.each do |name|
       user = users(:normal_user)
       user.email = name
     end
     
     bad.each do |name|
       user = users(:normal_user)
       user.email = name
-      assert !user.valid?, "#{name} is valid when it shouldn't be" 
+      assert user.invalid?(:save), "#{name} is valid when it shouldn't be" 
     end
   end
   
     end
   end