Commit 7bd91278 authored by Stuart Nelson's avatar Stuart Nelson Committed by Sean McGivern

Add spec for issue_due_worker

parent 556546a9
......@@ -5,6 +5,13 @@ describe IssueDueWorker do
let(:worker) { described_class.new }
it 'finds issues due on the day run' do
issue1 = create(:issue, :opened, due_date: Date.today)
issue3 = create(:issue, :opened, due_date: 3.days.from_now)
issue4 = 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment