Merge pull request #1903 from lrbalt/fix-test-errors

Fix failing tests for non-UTC timezones
This commit is contained in:
Matt Rogers 2015-08-07 19:50:58 -04:00
commit 1c0a70df75
27 changed files with 205 additions and 198 deletions

View file

@ -22,8 +22,8 @@ class TodoTest < ActiveSupport::TestCase
assert_equal "Call Bill Gates to find out how much he makes per day", @not_completed1.description
assert_nil @not_completed1.notes
assert @not_completed1.completed? == false
assert_equal 1.week.ago.beginning_of_day.strftime("%Y-%m-%d %H:%M"), @not_completed1.created_at.beginning_of_day.strftime("%Y-%m-%d %H:%M")
assert_equal 2.week.from_now.beginning_of_day.strftime("%Y-%m-%d"), @not_completed1.due.strftime("%Y-%m-%d")
assert_equal 1.week.ago.utc.beginning_of_day, @not_completed1.created_at.utc
assert_equal 2.week.from_now.utc.beginning_of_day, @not_completed1.due.utc
assert_nil @not_completed1.completed_at
assert_equal 1, @not_completed1.user_id
end