mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Fix specs
This commit is contained in:
parent
631ee0e64c
commit
8dd7ba8363
1 changed files with 3 additions and 3 deletions
|
|
@ -16,10 +16,10 @@ RSpec.describe Export, type: :model do
|
||||||
describe 'callbacks' do
|
describe 'callbacks' do
|
||||||
describe 'after_commit' do
|
describe 'after_commit' do
|
||||||
context 'when the export is created' do
|
context 'when the export is created' do
|
||||||
let(:export) { build(:export) }
|
let(:export) { build(:export, file_type: :points) }
|
||||||
|
|
||||||
it 'enqueues the ExportJob' do
|
it 'enqueues the ExportJob' do
|
||||||
expect(ExportJob).to receive(:perform_later).with(export.id)
|
expect(ExportJob).to receive(:perform_later)
|
||||||
|
|
||||||
export.save!
|
export.save!
|
||||||
end
|
end
|
||||||
|
|
@ -39,7 +39,7 @@ RSpec.describe Export, type: :model do
|
||||||
let(:export) { create(:export) }
|
let(:export) { create(:export) }
|
||||||
|
|
||||||
it 'removes the attached file' do
|
it 'removes the attached file' do
|
||||||
expect(export.file).to receive(:purge)
|
expect(export.file).to receive(:purge_later)
|
||||||
|
|
||||||
export.destroy!
|
export.destroy!
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue