From 9b8664daf17dac9efb1f4add9d00c562e4ddbf40 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 1 Nov 2025 08:58:34 +0100 Subject: fix tests --- tests/administration_rw_tests.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'tests/administration_rw_tests.cpp') diff --git a/tests/administration_rw_tests.cpp b/tests/administration_rw_tests.cpp index 794c12a..be52f5f 100644 --- a/tests/administration_rw_tests.cpp +++ b/tests/administration_rw_tests.cpp @@ -18,20 +18,13 @@ static void teardown_cb(void *data) { TEST _administration_rw_taxrate(void) { tax_rate pw; - tax_rate pr; u32 count; administration_writer::create(); administration::create_empty(test_file_path); { - pw = administration::tax_rate_create_empty(); - pw.rate = 10.0f; - pw.type = tax_rate_type::TAX_RATE_OUTGOING_INVOICE; - strops::copy(pw.internal_code, "NL/21", sizeof(pw.internal_code)); - strops::copy(pw.category_code, "S", sizeof(pw.category_code)); - strops::copy(pw.tax_sections[pw.tax_section_count++], "NL/1a", MAX_LEN_SHORT_DESC); - + administration::tax_rate_get_by_internal_code(&pw, "NL/21"); count = administration::tax_rate_count(); administration::tax_rate_enable(pw); @@ -41,8 +34,7 @@ TEST _administration_rw_taxrate(void) administration_reader::open_existing(test_file_path); { ASSERT_EQ(count+1, administration::tax_rate_count()); - ASSERT_EQ(A_ERR_SUCCESS, administration::tax_rate_get_by_internal_code(&pr, pw.internal_code)); - ASSERT_MEM_EQ(&pw, &pr, sizeof(tax_rate)); + ASSERT_EQ(A_ERR_SUCCESS, administration::tax_rate_is_enabled(pw)); } PASS(); -- cgit v1.2.3-70-g09d2