blob: 9004edbee3ad1bdc555fc04c212a6cba1b5968f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
require 'spec_helper'
describe IssueDueWorker do
describe 'perform' do
let(:worker) { described_class.new }
it 'finds issues due on the day run' do
issue1 = create(:issue, :opened, due_date: Date.today)
create(:issue, :opened, due_date: 3.days.from_now)
create(:issue, :opened, due_date: 4.days.from_now)
expect_any_instance_of(NotificationService).to receive(:issue_due_email).with(issue1)
worker.perform
end
end
end
|