docbrown/spec/workers/billboard_event_rollup_worker_spec.rb
Anna Buianova e659dbfc00
Renamed display_ad_events variables and associations (#19788)
* Renamed stuff related to display_ad_events (except the model)

* Updated user billboard_events association spec

* Fixed display_ad_event factory
2023-07-21 14:59:28 +03:00

19 lines
480 B
Ruby

require "rails_helper"
RSpec.describe BillboardEventRollupWorker, type: :worker do
subject(:worker) { described_class.new }
before do
allow(BillboardEventRollup).to receive(:rollup)
end
include_examples "#enqueues_on_correct_queue", "low_priority"
describe "#perform" do
it "rollups one month ago" do
month_ago = Date.current - 32.days
worker.perform
expect(BillboardEventRollup).to have_received(:rollup).with(month_ago)
end
end
end