public
Description: OneBody is web-based software that connects community members, especially churches, on the web.
Homepage: http://beonebody.com
Clone URL: git://github.com/seven1m/onebody.git
Test that birthday_soon? method is working.
Tim Morgan (author)
Wed Oct 15 06:14:00 -0700 2008
commit  259f8a6490a3efd86fe5e6a19b87ffc149aca567
tree    1e346909cd8c922d4c2750c42c4b9495ef37c4e5
parent  2c986370f6b9a598112f1d918c2e821b239049f0
...
109
110
111
 
 
 
 
 
 
 
112
113
114
...
109
110
111
112
113
114
115
116
117
118
119
120
121
0
@@ -109,6 +109,13 @@ class PersonTest < Test::Unit::TestCase
0
     assert_match /PDF\-1\.3/, people(:tim).generate_directory_pdf.to_s[0..100]
0
   end
0
   
0
+  should "know when a birthday is coming up" do
0
+    people(:tim).update_attributes!(:birthday => Date.today + 5)
0
+    assert people(:tim).reload.birthday_soon?
0
+    people(:tim).update_attributes!(:birthday => Date.today + BIRTHDAY_SOON_DAYS + 1)
0
+    assert !people(:tim).reload.birthday_soon?
0
+  end
0
+  
0
   private
0
   
0
     def partial_fixture(table, name, valid_attributes)

Comments