mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-28 12:22:04 +01:00
change to args which will be passed to Job#perform
This commit is contained in:
@@ -19,9 +19,9 @@ describe Crono::PerformerProxy do
|
||||
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'})
|
||||
it 'should add job with args to schedule' do
|
||||
expect(Crono::Job).to receive(:new).with(TestJob, kind_of(Crono::Period), [:some, {some: 'data'}])
|
||||
allow(Crono.scheduler).to receive(:add_job)
|
||||
Crono.perform(TestJob, {some: 'data'}).every(2.days, at: '15:30')
|
||||
Crono.perform(TestJob, :some, {some: 'data'}).every(2.days, at: '15:30')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user