mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
parent
7cc479c3fe
commit
8d4b2d902b
2 changed files with 12 additions and 14 deletions
|
@ -8,4 +8,16 @@ class InvoiceTest < ActiveSupport::TestCase
|
|||
def test_valid
|
||||
assert @invoice.valid?
|
||||
end
|
||||
|
||||
def test_calculates_subtotal
|
||||
assert_equal BigDecimal('15'), @invoice.sum_without_vat
|
||||
end
|
||||
|
||||
def test_calculates_vat_amount
|
||||
assert_equal BigDecimal('1.5'), @invoice.vat
|
||||
end
|
||||
|
||||
def test_calculates_total
|
||||
assert_equal BigDecimal('16.5'), @invoice.sum
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue