docbrown/spec/services/edge_cache/bust_podcast_spec.rb
Alex 8598ed090e
Create services for busting pages, tags, events, and podcasts (#11812)
* Create bust_page service and spec

* Specify spec with .once

* Create bust_tag service and spec

* Create bust_event service and spec

* Create bust_podcast service and spec
2020-12-09 10:37:02 -05:00

24 lines
477 B
Ruby

require "rails_helper"
RSpec.describe EdgeCache::BustPodcast, type: :service do
let(:podcast_path) { "podcast_path" }
let(:paths) do
[
"/#{podcast_path}",
]
end
before do
paths.each do |path|
allow(described_class).to receive(:bust).with(path).once
end
end
it "busts the cache" do
described_class.call(podcast_path)
paths.each do |path|
expect(described_class).to have_received(:bust).with(path).once
end
end
end