mirror of
https://github.com/internetee/registry.git
synced 2025-07-26 04:28:27 +02:00
Add database constraints
This commit is contained in:
parent
cb823bbe1f
commit
9668ec33d9
5 changed files with 58 additions and 18 deletions
|
@ -11,7 +11,8 @@ class InvoiceTest < ActiveSupport::TestCase
|
|||
|
||||
def test_overdue_scope_returns_unpaid_uncancelled_invoices_with_past_due_date
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
@invoice.update!(account_activity: nil, cancelled_at: nil, due_date: '2010-07-04')
|
||||
@invoice.update!(account_activity: nil, cancelled_at: nil, issue_date: '2010-07-04',
|
||||
due_date: '2010-07-04')
|
||||
|
||||
assert Invoice.overdue.include?(@invoice), 'Should return overdue invoice'
|
||||
end
|
||||
|
@ -108,4 +109,4 @@ class InvoiceTest < ActiveSupport::TestCase
|
|||
seller_zip: nil)
|
||||
assert_equal 'street, city, state', invoice.seller_address
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue