dawarich/spec/jobs/export_job_spec.rb

16 lines
376 B
Ruby
Raw Permalink Normal View History

2024-06-12 14:29:38 -04:00
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe ExportJob, type: :job do
let(:export) { create(:export) }
let(:start_at) { 1.day.ago }
let(:end_at) { Time.zone.now }
it 'calls the Exports::Create service class' do
expect(Exports::Create).to receive(:new).with(export:).and_call_original
2024-06-12 14:29:38 -04:00
described_class.perform_now(export.id)
2024-06-12 14:29:38 -04:00
end
end