Remove Articles/BustMultipleCachesJob (#5388)

This is a follow up from #5309.
This commit removes the Articles/BustMultipleCachesJob after we migrated
it to Sidekiq.
This commit is contained in:
Cadu Ribeiro 2020-01-07 13:20:06 -03:00 committed by Molly Struve
parent 44403eba89
commit 4d7d3edb2d
2 changed files with 0 additions and 31 deletions

View file

@ -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

View file

@ -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