diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-11-01 08:58:34 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-11-01 08:58:34 +0100 |
| commit | 9b8664daf17dac9efb1f4add9d00c562e4ddbf40 (patch) | |
| tree | 6c3396be134996ee3ce75b0ff9a2eca09452104d /tests/administration_rw_tests.cpp | |
| parent | 60488d722bf29f3ff0ce3e08b90f30523a8d7b6d (diff) | |
fix tests
Diffstat (limited to 'tests/administration_rw_tests.cpp')
| -rw-r--r-- | tests/administration_rw_tests.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
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(); |
