diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-07-03 12:46:36 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-07-03 12:46:36 +0100 |
| commit | 1f9547fc3e26e8d1407b696dedc69aa402b7311c (patch) | |
| tree | a108bcff8ab579985816b222beae873eda0499a8 /tests | |
| parent | 7926658c69ab7dea2b7bbe7f9d79ac464f7bdedf (diff) | |
Test that comments are ignored by default
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/conversion_tests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py index 287d844..0b5421b 100644 --- a/tests/conversion_tests.py +++ b/tests/conversion_tests.py @@ -426,6 +426,25 @@ def footnotes_are_included_after_the_main_body(): assert_equal(expected_html, result.value) +@istest +def comments_are_ignored_by_default(): + reference = documents.comment_reference("4") + comment = documents.comment( + comment_id="4", + body=[_paragraph_with_text("Who's there?")], + ) + document = documents.document( + [documents.paragraph([ + _run_with_text("Knock knock"), + documents.run([reference]) + ])], + comments=[comment], + ) + result = convert_document_element_to_html(document, id_prefix="doc-42-") + expected_html = '<p>Knock knock</p>' + assert_equal(expected_html, result.value) + + def _paragraph_with_text(text): return documents.paragraph(children=[_run_with_text(text)]) |
