1
0
Fork 0
mirror of https://github.com/endofunky/sidetiq.git synced 2022-11-09 13:53:30 -05:00
endofunky--sidetiq/test/test_schedule.rb

25 lines
608 B
Ruby

require_relative 'helper'
class TestSchedule < Sidetiq::TestCase
def test_super
assert_equal IceCube::Schedule, Sidetiq::Schedule.superclass
end
def test_method_missing
sched = Sidetiq::Schedule.new
sched.daily
assert_equal "Daily", sched.to_s
end
def test_schedule_next?
sched = Sidetiq::Schedule.new
sched.daily
assert sched.schedule_next?(Time.now + (24 * 60 * 60))
refute sched.schedule_next?(Time.now + (24 * 60 * 60))
assert sched.schedule_next?(Time.now + (2 * 24 * 60 * 60))
refute sched.schedule_next?(Time.now + (2 * 24 * 60 * 60))
end
end