mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Followed up 38722fa179
This commit is contained in:
parent
95f570d0d3
commit
2a2a707829
1 changed files with 4 additions and 8 deletions
|
@ -19,8 +19,7 @@ class TestLogPeriod < Test::Unit::TestCase
|
|||
next_month = Time.parse("2019-08-1 00:00:00")
|
||||
assert_equal(next_month, monthly_result)
|
||||
|
||||
result = Logger::Period.next_rotate_time(time, 'invalid')
|
||||
assert_equal(time, result)
|
||||
assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, 'invalid') }
|
||||
end
|
||||
|
||||
def test_next_rotate_time_extreme_cases
|
||||
|
@ -39,8 +38,7 @@ class TestLogPeriod < Test::Unit::TestCase
|
|||
next_month = Time.parse("2018-08-1 00:00:00")
|
||||
assert_equal(next_month, monthly_result)
|
||||
|
||||
result = Logger::Period.next_rotate_time(time, 'invalid')
|
||||
assert_equal(time, result)
|
||||
assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, 'invalid') }
|
||||
end
|
||||
|
||||
def test_previous_period_end
|
||||
|
@ -58,8 +56,7 @@ class TestLogPeriod < Test::Unit::TestCase
|
|||
month_ago = Time.parse("2019-06-30 23:59:59")
|
||||
assert_equal(month_ago, monthly_result)
|
||||
|
||||
result = Logger::Period.previous_period_end(time, 'invalid')
|
||||
assert_equal(time, result)
|
||||
assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, 'invalid') }
|
||||
end
|
||||
|
||||
def test_previous_period_end_extreme_cases
|
||||
|
@ -78,7 +75,6 @@ class TestLogPeriod < Test::Unit::TestCase
|
|||
month_ago = Time.parse("2018-06-30 23:59:59")
|
||||
assert_equal(month_ago, monthly_result)
|
||||
|
||||
result = Logger::Period.previous_period_end(time, 'invalid')
|
||||
assert_equal(time, result)
|
||||
assert_raise(ArgumentError) { Logger::Period.next_rotate_time(time, 'invalid') }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue