Merge pull request #23776 from chi6rag/master
Adding test to verify the last week when the year is leap
This commit is contained in:
commit
44888ecbe9
@ -186,6 +186,10 @@ def test_last_week
|
||||
assert_equal DateTime.civil(2006,11,15), DateTime.civil(2006,11,23,0,0,0).last_week(:wednesday)
|
||||
end
|
||||
|
||||
def test_date_time_should_have_correct_last_week_for_leap_year
|
||||
assert_equal DateTime.civil(2016, 2, 29), DateTime.civil(2016, 3, 7).last_week
|
||||
end
|
||||
|
||||
def test_last_month_on_31st
|
||||
assert_equal DateTime.civil(2004, 2, 29), DateTime.civil(2004, 3, 31).last_month
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user