Skip to content

Commit

Permalink
[auto-clear] Fix test: Add xaccAccountBeginEdit / xaccAccountCommitEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiklein committed Oct 30, 2020
1 parent 2faecb2 commit 5cd777b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libgnucash/app-utils/test/test-autoclear.cpp
Expand Up @@ -90,6 +90,7 @@ TEST(AutoClear, AutoClearAll) {
Account *account = xaccMallocAccount(book);
xaccAccountSetName(account, "Test Account");

xaccAccountBeginEdit(account);
for (auto &d : splitData) {
Split *split = xaccMallocSplit(book);
xaccSplitSetMemo(split, d.memo);
Expand All @@ -99,7 +100,7 @@ TEST(AutoClear, AutoClearAll) {

gnc_account_insert_split(account, split);
}
xaccAccountRecomputeBalance(account);
xaccAccountCommitEdit(account);

for (auto &t : testCases) {
gnc_numeric amount_to_clear = gnc_numeric_create(t.amount, DENOM);
Expand Down

0 comments on commit 5cd777b

Please sign in to comment.