Fix incorrect URL being used when cache busting (#34189)

This commit is contained in:
Claire 2025-03-17 17:40:28 +01:00 committed by GitHub
parent 2a5853989f
commit e30001bc80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 24 deletions

View file

@ -295,12 +295,12 @@ RSpec.describe MediaAttachment, :attachment_processing do
end
it 'queues CacheBusterWorker jobs' do
original_path = media.file.path(:original)
small_path = media.file.path(:small)
original_url = media.file.url(:original)
small_url = media.file.url(:small)
expect { media.destroy }
.to enqueue_sidekiq_job(CacheBusterWorker).with(original_path)
.and enqueue_sidekiq_job(CacheBusterWorker).with(small_path)
.to enqueue_sidekiq_job(CacheBusterWorker).with(original_url)
.and enqueue_sidekiq_job(CacheBusterWorker).with(small_url)
end
end