2019-04-30 10:27:42 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-07-28 05:27:38 +03:00
|
|
|
RSpec.describe ::Jobs::Onceoff do
|
2018-06-20 09:09:13 +10:00
|
|
|
it "can run all once off jobs without errors" do
|
2021-06-07 20:38:31 +02:00
|
|
|
# Load all once offs
|
2023-01-09 11:18:21 +00:00
|
|
|
Dir[Rails.root + "app/jobs/onceoff/*.rb"].each do |f|
|
|
|
|
require_relative "../../app/jobs/onceoff/" + File.basename(f)
|
2018-06-20 09:09:13 +10:00
|
|
|
end
|
2021-06-07 20:38:31 +02:00
|
|
|
|
2024-07-25 13:30:56 +08:00
|
|
|
described_class.onceoff_job_klasses.each { |job| job.new.execute_onceoff(nil) }
|
2018-06-20 09:09:13 +10:00
|
|
|
end
|
|
|
|
end
|