Fix specs

This commit is contained in:
Eugene Burmakin 2025-06-26 20:05:26 +02:00
parent 631ee0e64c
commit 8dd7ba8363

View file

@ -16,10 +16,10 @@ RSpec.describe Export, type: :model do
describe 'callbacks' do
describe 'after_commit' do
context 'when the export is created' do
let(:export) { build(:export) }
let(:export) { build(:export, file_type: :points) }
it 'enqueues the ExportJob' do
expect(ExportJob).to receive(:perform_later).with(export.id)
expect(ExportJob).to receive(:perform_later)
export.save!
end
@ -39,7 +39,7 @@ RSpec.describe Export, type: :model do
let(:export) { create(:export) }
it 'removes the attached file' do
expect(export.file).to receive(:purge)
expect(export.file).to receive(:purge_later)
export.destroy!
end