Commit e6f319821c95ef4afcd58a85987687dd930a4801

Authored by AntonioTerceiro
1 parent 88224fbf

r213@sede: terceiro | 2007-07-28 06:56:27 -0300

ActionItem6: fixing the test
 


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@217 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 7 additions and 5 deletions   Show diff stats
test/unit/enterprise_test.rb
@@ -51,15 +51,17 @@ class EnterpriseTest < Test::Unit::TestCase @@ -51,15 +51,17 @@ class EnterpriseTest < Test::Unit::TestCase
51 51
52 e = Enterprise.new(:identifier => 'test_numericality_year', :name => 'numeric_year') 52 e = Enterprise.new(:identifier => 'test_numericality_year', :name => 'numeric_year')
53 e.foundation_year = 'xxxx' 53 e.foundation_year = 'xxxx'
54 - assert ! e.save 54 + e.valid?
  55 + assert e.errors.invalid?(:foundation_year)
55 56
56 e.foundation_year = 20.07 57 e.foundation_year = 20.07
57 - assert ! e.save  
58 - 58 + e.valid?
  59 + assert e.errors.invalid?(:foundation_year)
  60 +
59 e.foundation_year = 2007 61 e.foundation_year = 2007
60 - assert e.save 62 + e.valid?
  63 + assert ! e.errors.invalid?(:foundation_year)
61 64
62 - assert count + 1, Enterprise.count  
63 end 65 end
64 66
65 end 67 end