]> git.openstreetmap.org Git - rails.git/blobdiff - test/unit/user_test.rb
sort the default test database user and password.
[rails.git] / test / unit / user_test.rb
index 5468f7a2d90fc88f295f8beb1cfc595699bfce10..5f4c9525fec14cd7b19d8681a296f6bad46a6aa1 100644 (file)
@@ -7,4 +7,18 @@ class UserTest < Test::Unit::TestCase
   def test_truth
     assert true
   end
   def test_truth
     assert true
   end
+  
+  def test_invalid_with_empty_attributes
+    user = User.new
+    assert !user.valid?
+    assert user.errors.invalid?(:email)
+    assert user.errors.invalid?(:pass_crypt)
+    assert user.errors.invalid?(:display_name)
+    assert user.errors.invalid?(:email)
+    assert !user.errors.invalid?(:home_lat)
+    assert !user.errors.invalid?(:home_lon)
+    assert !user.errors.invalid?(:home_zoom)
+  end
+  
+  
 end
 end