mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
parent
f86ab085ac
commit
7dee10c683
13 changed files with 29 additions and 13 deletions
|
@ -8,7 +8,7 @@ FactoryBot.define do
|
|||
seller_name { 'EIS' }
|
||||
seller_city { 'Tallinn' }
|
||||
seller_street { 'Paldiski mnt. 123' }
|
||||
vat_prc 0.2
|
||||
vat_rate 0.2
|
||||
buyer { FactoryBot.create(:registrar) }
|
||||
|
||||
after :build do |invoice|
|
||||
|
|
|
@ -54,7 +54,7 @@ describe Invoice do
|
|||
|
||||
it 'should calculate sums correctly' do
|
||||
@invoice = create(:invoice)
|
||||
@invoice.vat_prc.should == BigDecimal.new('0.2')
|
||||
@invoice.vat_rate.should == BigDecimal.new('0.2')
|
||||
@invoice.sum_without_vat.should == BigDecimal.new('300.0')
|
||||
@invoice.vat.should == BigDecimal.new('60.0')
|
||||
@invoice.sum.should == BigDecimal.new('360.0')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue