diff --git a/tests/test_meta_repo_links.py b/tests/test_meta_repo_links.py index b174c54c0f4b03cd96e7fc946935bbbb65352bf5..4c44e46c5292bc0a63fd0fb1c866d913553c0814 100644 --- a/tests/test_meta_repo_links.py +++ b/tests/test_meta_repo_links.py @@ -100,6 +100,18 @@ def test_bad_post_links(hook): actual = {error.message for error in hook.run(txn)} assert expected == actual +@pytest.mark.parametrize('value', testutil.NON_STRING_METADATA_VALUES) +def test_bad_metadata_type(hook, value): + txn = testutil.Transaction(**{'check': value}, postings=[ + ('Income:Donations', -5), + ('Assets:Cash', 5), + ]) + expected = {'transaction has wrong type of check: expected str but is a {}'.format( + type(value).__name__, + )} + actual = {error.message for error in hook.run(txn)} + assert expected == actual + @pytest.mark.parametrize('ext_doc', [ 'rt:123', 'rt:456/789',