docbrown/spec/workers/users/bust_cache_worker_spec.rb
Michael Kohl 5da625cadb
Rubocop fixes (#15892)
* Add missing spaces

* Use filter_map over map + reject/compact

* Simplify FactoryBot calls

* Use to_h with block instead of map + to_h

* Use guard clause
2021-12-28 09:11:41 -06:00

15 lines
372 B
Ruby

require "rails_helper"
RSpec.describe Users::BustCacheWorker, type: :worker do
describe "#perform" do
let(:user) { create(:user) }
let(:worker) { subject }
it "busts cache" do
allow(EdgeCache::BustUser).to receive(:call).with(user)
worker.perform(user.id)
expect(EdgeCache::BustUser).to have_received(:call).with(user)
end
end
end