mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-17 06:29:49 +02:00
add config class and schedule
This commit is contained in:
16
spec/extensions/active_job_spec.rb
Normal file
16
spec/extensions/active_job_spec.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require "spec_helper"
|
||||
|
||||
class TestJob < ActiveJob::Base
|
||||
def perform;end
|
||||
end
|
||||
|
||||
TestJob.extend(Periodicity::Extensions::ActiveJob)
|
||||
|
||||
describe Periodicity::Extensions::ActiveJob do
|
||||
describe "#perform_every" do
|
||||
it "should add job and period to schedule" do
|
||||
TestJob.perform_every(1.second)
|
||||
expect(Periodicity::Config.instance.schedule).to_not be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user