|
@@ -1,7 +1,23 @@
|
|
|
+import pytest
|
|
|
+
|
|
|
from ..parser import parse
|
|
|
|
|
|
|
|
|
-def test_short_image_markdown(request_mock, user, snapshot):
|
|
|
- text = "!(http://somewhere.com/image.jpg)"
|
|
|
+@pytest.mark.parametrize(
|
|
|
+ "text",
|
|
|
+ [
|
|
|
+ pytest.param("!(http://somewhere.com/image.jpg)", id="base"),
|
|
|
+ pytest.param("! (space)", id="space-one-word"),
|
|
|
+ pytest.param("! (space with other words)", id="space-multiple-words"),
|
|
|
+ pytest.param(
|
|
|
+ "Text before exclamation mark!(http://somewhere.com/image.jpg)",
|
|
|
+ id="text-before-mark",
|
|
|
+ ),
|
|
|
+ pytest.param(
|
|
|
+ "Text before with space in between! (sometext)", id="text-before-with-space"
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+)
|
|
|
+def test_short_image_markdown(request_mock, user, snapshot, text):
|
|
|
result = parse(text, request_mock, user, minify=False)
|
|
|
snapshot.assert_match(result["parsed_text"])
|