Changed all Date objects to Datetimes and migrated everything appropriately. Tests & specs pass, but this still needs a thorough review.

This commit is contained in:
Eric Allen 2008-09-13 13:33:48 -07:00
parent c85c5fd957
commit 778427405a
11 changed files with 49 additions and 16 deletions

View file

@ -25,7 +25,7 @@ class ProjectsControllerTest < TodoContainerControllerTestBase
assert_equal 1, assigns['deferred'].size
t = p.not_done_todos[0]
t.show_from = 1.days.from_now.utc.to_date
t.show_from = 1.days.from_now.utc
t.save!
get :show, :id => p.to_param

View file

@ -137,7 +137,7 @@ class TodosControllerTest < Test::Rails::TestCase
assert_equal "Call Warren Buffet to find out how much he makes per day", t.description
assert_equal "foo, bar", t.tag_list
expected = Date.new(2006,11,30)
actual = t.due
actual = t.due.to_date
assert_equal expected, actual, "Expected #{expected.to_s(:db)}, was #{actual.to_s(:db)}"
end
@ -328,7 +328,7 @@ class TodosControllerTest < Test::Rails::TestCase
assert t.active?
assert_equal 'test notes', t.notes
assert_nil t.show_from
assert_equal Date.new(2007,1,2).to_s, t.due.to_s
assert_equal Date.new(2007,1,2), t.due.to_date
end
def test_mobile_create_action_redirects_to_mobile_home_page_when_successful