You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
454 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe CacheBusterWorker do
  4. let(:worker) { described_class.new }
  5. describe 'perform' do
  6. let(:path) { 'https://example.com' }
  7. let(:service) { instance_double(CacheBuster, bust: true) }
  8. it 'calls the cache buster' do
  9. allow(CacheBuster).to receive(:new).and_return(service)
  10. worker.perform(path)
  11. expect(service).to have_received(:bust).with(path)
  12. end
  13. end
  14. end