mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Automatic invoice cancelling #2539
This commit is contained in:
parent
7139a0c9ed
commit
7a26b77606
2 changed files with 2 additions and 2 deletions
|
@ -71,7 +71,7 @@ describe Invoice do
|
|||
end
|
||||
|
||||
it 'should cancel overdue invoices' do
|
||||
Fabricate(:invoice, created_at: Time.zone.now - 35.days, due_date: Time.zone.now - 1.days)
|
||||
Fabricate(:invoice, created_at: Time.zone.now - 35.days, due_date: Time.zone.now - 30.days)
|
||||
Invoice.cancel_overdue_invoices
|
||||
Invoice.where(cancelled_at: nil).count.should == 1
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue