aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/writers/markdown_tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/writers/markdown_tests.py b/tests/writers/markdown_tests.py
index 82131b4..dd25818 100644
--- a/tests/writers/markdown_tests.py
+++ b/tests/writers/markdown_tests.py
@@ -110,6 +110,13 @@ def links_have_anchors_before_opening_square_bracket():
writer.text("Hello")
writer.end("a")
assert_equal('<a id="start"></a>[Hello](http://example.com)', writer.as_string())
+
+
+@istest
+def image_elements_are_written_as_markdown_images():
+ writer = _create_writer()
+ writer.self_closing("img", {"src": "http://example.com/image.jpg", "alt": "Alt Text"})
+ assert_equal("![Alt Text](http://example.com/image.jpg)", writer.as_string())
def _create_writer():