Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Sep 25, 2023
1 parent 8e7de8a commit 5af7a55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/models/billing_profile_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_vat_codes_must_be_unique_per_user
duplicate = @billing_profile.dup

assert_not(duplicate.valid?)
assert_equal(duplicate.errors[:vat_code], ['has already been taken'])
assert(duplicate.errors[:vat_code].include? 'has already been taken')

private_person_profile = billing_profiles(:private_person)

Expand Down Expand Up @@ -150,14 +150,14 @@ def test_if_billing_profile_updated_all_related_issued_invoices_also_updated
assert_equal invoice.billing_vat_code, @billing_profile.vat_code
assert_equal invoice.billing_alpha_two_country_code, @billing_profile.alpha_two_country_code

@billing_profile.update(name: 'New Company Ltd', vat_code: '12345')
@billing_profile.update(name: 'New Company Ltd', vat_code: 'DE123456789')
@billing_profile.reload && invoice.reload

invoice = @billing_profile.invoices.first
assert_equal invoice.status, 'issued'
assert_equal invoice.billing_name, 'New Company Ltd'
assert_equal invoice.billing_address, @billing_profile.address
assert_equal invoice.billing_vat_code, '12345'
assert_equal invoice.billing_vat_code, 'DE123456789'
assert_equal invoice.billing_alpha_two_country_code, @billing_profile.alpha_two_country_code
end

Expand Down

0 comments on commit 5af7a55

Please sign in to comment.