Convert specs to tests

#623
This commit is contained in:
Artur Beljajev 2018-03-12 11:36:07 +02:00
parent 7cc479c3fe
commit 8d4b2d902b
2 changed files with 12 additions and 14 deletions

View file

@ -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