Sha256: b04c867bc911924b63f55cd657c41b23e742d809154e48c7909d34efffc1bc8e

Contents?: true

Size: 608 Bytes

Versions: 5

Compression:

Stored size: 608 Bytes

Contents

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sidetiq-0.2.0 test/test_schedule.rb
sidetiq-0.1.5 test/test_schedule.rb
sidetiq-0.1.4 test/test_schedule.rb
sidetiq-0.1.3 test/test_schedule.rb
sidetiq-0.1.2 test/test_schedule.rb