From 5af7a558c2fbb29bb95b8b63a5e58c0809db4791 Mon Sep 17 00:00:00 2001 From: Oleg Hasjanov Date: Mon, 25 Sep 2023 13:40:48 +0300 Subject: [PATCH] updated tests --- test/models/billing_profile_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/models/billing_profile_test.rb b/test/models/billing_profile_test.rb index f60d37b00..ba32dec2c 100644 --- a/test/models/billing_profile_test.rb +++ b/test/models/billing_profile_test.rb @@ -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) @@ -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