diff --git a/app/jobs/articles/bust_multiple_caches_job.rb b/app/jobs/articles/bust_multiple_caches_job.rb deleted file mode 100644 index 738fc4845..000000000 --- a/app/jobs/articles/bust_multiple_caches_job.rb +++ /dev/null @@ -1,12 +0,0 @@ -module Articles - class BustMultipleCachesJob < ApplicationJob - queue_as :articles_bust_multiple_caches - - def perform(article_ids, cache_buster = CacheBuster) - Article.select(:id, :path).where(id: article_ids).find_each do |article| - cache_buster.bust(article.path) - cache_buster.bust("#{article.path}?i=i") - end - end - end -end diff --git a/spec/jobs/articles/bust_multiple_caches_job_spec.rb b/spec/jobs/articles/bust_multiple_caches_job_spec.rb deleted file mode 100644 index 1c9791513..000000000 --- a/spec/jobs/articles/bust_multiple_caches_job_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require "rails_helper" - -RSpec.describe Articles::BustMultipleCachesJob, type: :job do - include_examples "#enqueues_job", "articles_bust_multiple_caches", [1, 2] - - describe "#perform_now" do - it "busts cache" do - article = create(:article) - path = article.path - - cache_buster = double - allow(cache_buster).to receive(:bust) - - described_class.perform_now([article.id], cache_buster) - expect(cache_buster).to have_received(:bust).with(path).once - expect(cache_buster).to have_received(:bust).with(path + "?i=i").once - end - end -end