Don't push to cache buster if attachment path is nil (#31414)
This commit is contained in:
parent
8d96907933
commit
95c11d365d
2 changed files with 1 additions and 3 deletions
|
@ -302,12 +302,10 @@ RSpec.describe MediaAttachment, :attachment_processing do
|
|||
it 'queues CacheBusterWorker jobs' do
|
||||
original_path = media.file.path(:original)
|
||||
small_path = media.file.path(:small)
|
||||
thumbnail_path = media.thumbnail.path(:original)
|
||||
|
||||
expect { media.destroy }
|
||||
.to enqueue_sidekiq_job(CacheBusterWorker).with(original_path)
|
||||
.and enqueue_sidekiq_job(CacheBusterWorker).with(small_path)
|
||||
.and enqueue_sidekiq_job(CacheBusterWorker).with(thumbnail_path)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue