diff --git a/app/jobs/tags/bust_cache_job.rb b/app/jobs/tags/bust_cache_job.rb deleted file mode 100644 index a924a754b..000000000 --- a/app/jobs/tags/bust_cache_job.rb +++ /dev/null @@ -1,12 +0,0 @@ -module Tags - class BustCacheJob < ApplicationJob - queue_as :tags_bust_cache - - def perform(tag_name) - tag = Tag.find_by(name: tag_name) - return unless tag - - CacheBuster.bust_tag(tag) - end - end -end diff --git a/spec/jobs/tags/bust_cache_job_spec.rb b/spec/jobs/tags/bust_cache_job_spec.rb deleted file mode 100644 index 4c2cbb1fc..000000000 --- a/spec/jobs/tags/bust_cache_job_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "rails_helper" - -RSpec.describe Tags::BustCacheJob do - before do - allow(CacheBuster).to receive(:bust_tag) - end - - include_examples "#enqueues_job", "tags_bust_cache", "php" - - describe "#perform_now" do - it "busts cache" do - tag = create(:tag) - - described_class.perform_now(tag.name) - - expect(CacheBuster).to have_received(:bust_tag).with(tag) - end - - it "doesn't call the cache buster if the tag does not exist" do - tag_name = "definitelyatagthatdoesnotexist" - - described_class.perform_now(tag_name) - - expect(CacheBuster).not_to have_received(:bust_tag) - end - end -end