mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-18 06:59:51 +02:00
add data to Cron.perform which will be passed to ExampleJob.new(data).perform
This commit is contained in:
@@ -18,4 +18,10 @@ describe Crono::PerformerProxy do
|
||||
expect_any_instance_of(described_class).to receive(:once_per)
|
||||
Crono.perform(TestJob).once_per 10.minutes
|
||||
end
|
||||
|
||||
it 'should add job with data to schedule' do
|
||||
expect(Crono::Job).to receive(:new).with(TestJob, kind_of(Crono::Period), {some: 'data'})
|
||||
allow(Crono.scheduler).to receive(:add_job)
|
||||
Crono.perform(TestJob, {some: 'data'}).every(2.days, at: '15:30')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user