summaryrefslogtreecommitdiff
path: root/tests/administration_rw_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/administration_rw_tests.cpp')
-rw-r--r--tests/administration_rw_tests.cpp12
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();