mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 15:14:47 +02:00
parent
f86ab085ac
commit
7dee10c683
13 changed files with 29 additions and 13 deletions
2
test/fixtures/invoices.yml
vendored
2
test/fixtures/invoices.yml
vendored
|
@ -6,7 +6,7 @@ DEFAULTS: &DEFAULTS
|
|||
seller_name: John Doe
|
||||
seller_iban: 1234
|
||||
buyer_name: Jane Doe
|
||||
vat_prc: 0.2
|
||||
vat_rate: 0.2
|
||||
|
||||
valid:
|
||||
<<: *DEFAULTS
|
||||
|
|
9
test/models/invoice_test.rb
Normal file
9
test/models/invoice_test.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
require 'test_helper'
|
||||
|
||||
class InvoiceTest < ActiveSupport::TestCase
|
||||
def test_invalid_without_vat_rate
|
||||
invoice = Invoice.new(vat_rate: nil)
|
||||
invoice.validate
|
||||
assert invoice.errors.added?(:vat_rate, :blank)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue