2017-10-03 16:31:17 +02:00
|
|
|
require 'rails_helper'
|
|
|
|
include ActiveJob::TestHelper
|
|
|
|
|
2018-01-30 16:33:32 +01:00
|
|
|
RSpec.describe ApplicationJob, type: :job, skip: true do
|
2017-10-03 16:31:17 +02:00
|
|
|
describe 'perform' do
|
|
|
|
it do
|
|
|
|
expect(Rails.logger).to receive(:info).with(/.+started at.+/)
|
|
|
|
expect(Rails.logger).to receive(:info).with(/.+ended at.+/)
|
|
|
|
perform_enqueued_jobs { ChildJob.perform_later }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class ChildJob < ApplicationJob
|
|
|
|
def perform; end
|
|
|
|
end
|
|
|
|
end
|