test/scheduler_test.rb in resque-scheduler-4.0.0 vs test/scheduler_test.rb in resque-scheduler-4.1.0
- old
+ new
@@ -85,13 +85,19 @@
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
assert Resque::Scheduler.scheduled_jobs.include?('some_ivar_job')
Resque.redis.del(:schedules)
- Resque.redis.hset(:schedules, 'some_ivar_job2', Resque.encode(
- 'cron' => '* * * * *', 'class' => 'SomeIvarJob', 'args' => '/tmp/2'
- ))
+ Resque.redis.hset(
+ :schedules,
+ 'some_ivar_job2',
+ Resque.encode(
+ 'cron' => '* * * * *',
+ 'class' => 'SomeIvarJob',
+ 'args' => '/tmp/2'
+ )
+ )
Resque::Scheduler.reload_schedule!
assert_equal(1, Resque::Scheduler.rufus_scheduler.jobs.size)
@@ -364,12 +370,18 @@
)
assert Resque.redis.sismember(:schedules_changed, 'some_ivar_job')
end
test 'fetch_schedule returns a schedule' do
- Resque.redis.hset(:schedules, 'some_ivar_job2', Resque.encode(
- 'cron' => '* * * * *', 'class' => 'SomeIvarJob', 'args' => '/tmp/33'
- ))
+ Resque.redis.hset(
+ :schedules,
+ 'some_ivar_job2',
+ Resque.encode(
+ 'cron' => '* * * * *',
+ 'class' => 'SomeIvarJob',
+ 'args' => '/tmp/33'
+ )
+ )
assert_equal(
{ 'cron' => '* * * * *', 'class' => 'SomeIvarJob', 'args' => '/tmp/33' },
Resque.fetch_schedule('some_ivar_job2')
)
end