]> git.openstreetmap.org Git - rails.git/blob - test/unit/user_test.rb
5f4c9525fec14cd7b19d8681a296f6bad46a6aa1
[rails.git] / test / unit / user_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class UserTest < Test::Unit::TestCase
4   fixtures :users
5
6   # Replace this with your real tests.
7   def test_truth
8     assert true
9   end
10   
11   def test_invalid_with_empty_attributes
12     user = User.new
13     assert !user.valid?
14     assert user.errors.invalid?(:email)
15     assert user.errors.invalid?(:pass_crypt)
16     assert user.errors.invalid?(:display_name)
17     assert user.errors.invalid?(:email)
18     assert !user.errors.invalid?(:home_lat)
19     assert !user.errors.invalid?(:home_lon)
20     assert !user.errors.invalid?(:home_zoom)
21   end
22   
23   
24 end