16 lines
402 B
Ruby
16 lines
402 B
Ruby
require 'rails_helper'
|
|
include ActiveJob::TestHelper
|
|
|
|
RSpec.describe ApplicationJob, type: :job do
|
|
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
|