mirror of
https://github.com/github/rails.git
synced 2026-01-30 16:58:15 -05:00
Fix tests across DST (closes #9020) [mpalmer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7557 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -250,11 +250,13 @@ class TimeExtCalculationsTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_next_week
|
||||
assert_equal Time.local(2005,2,28), Time.local(2005,2,22,15,15,10).next_week
|
||||
assert_equal Time.local(2005,2,29), Time.local(2005,2,22,15,15,10).next_week(:tuesday)
|
||||
assert_equal Time.local(2005,3,4), Time.local(2005,2,22,15,15,10).next_week(:friday)
|
||||
assert_equal Time.local(2006,10,30), Time.local(2006,10,23,0,0,0).next_week
|
||||
assert_equal Time.local(2006,11,1), Time.local(2006,10,23,0,0,0).next_week(:wednesday)
|
||||
with_timezone 'US/Eastern' do
|
||||
assert_equal Time.local(2005,2,28), Time.local(2005,2,22,15,15,10).next_week
|
||||
assert_equal Time.local(2005,2,29), Time.local(2005,2,22,15,15,10).next_week(:tuesday)
|
||||
assert_equal Time.local(2005,3,4), Time.local(2005,2,22,15,15,10).next_week(:friday)
|
||||
assert_equal Time.local(2006,10,30), Time.local(2006,10,23,0,0,0).next_week
|
||||
assert_equal Time.local(2006,11,1), Time.local(2006,10,23,0,0,0).next_week(:wednesday)
|
||||
end
|
||||
end
|
||||
|
||||
def test_next_week_near_daylight_start
|
||||
|
||||
Reference in New Issue
Block a user