* Renamed stuff related to display_ad_events (except the model) * Updated user billboard_events association spec * Fixed display_ad_event factory
19 lines
480 B
Ruby
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
|