diff --git a/tests/test_meta_invoice.py b/tests/test_meta_invoice.py index 1d23aff2ead09c748289c81b206ad86f09ad9f11..17c69946066f0b180f0ff85bd1eef1ab475ad25e 100644 --- a/tests/test_meta_invoice.py +++ b/tests/test_meta_invoice.py @@ -144,3 +144,14 @@ def test_missing_invoice(hook, acct1, acct2): def test_not_required_on_opening(hook): txn = testutil.OpeningBalance() assert not list(hook.run(txn)) + +@pytest.mark.parametrize('acct1,acct2', testutil.combine_values( + REQUIRED_ACCOUNTS, + NON_REQUIRED_ACCOUNTS, +)) +def test_not_required_on_flagged(acct1, acct2, hook): + txn = testutil.Transaction(flag='!', postings=[ + (acct1, 25), + (acct2, -25), + ]) + assert not list(hook.run(txn))