Invoice filtering in registrar

This commit is contained in:
Martin Lensment 2015-04-28 12:14:20 +03:00
parent 1f2f483e34
commit 23098add74
13 changed files with 83 additions and 7 deletions

View file

@ -72,7 +72,8 @@ describe Invoice do
it 'should cancel overdue invoices' do
Fabricate(:invoice, created_at: Time.zone.now - 35.days, due_date: Time.zone.now - 1.days)
Invoice.cancel_overdue_invoices.should == 1
Invoice.cancel_overdue_invoices
Invoice.where(cancelled_at: nil).count.should == 1
end
# it 'should have one version' do