mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-13 09:43:10 +00:00
add failing test for #801
This commit is contained in:
parent
072d5e099f
commit
dcbaa851e4
3 changed files with 7 additions and 1 deletions
2
wagtail/tests/fixtures/test.json
vendored
2
wagtail/tests/fixtures/test.json
vendored
|
|
@ -224,7 +224,7 @@
|
|||
"date_from": "2015-04-22",
|
||||
"audience": "public",
|
||||
"location": "Ameristralia",
|
||||
"body": "<p>come celebrate the independence of Ameristralia</p>",
|
||||
"body": "<p>come celebrate the independence of Ameristralia <embed embedtype=\"image\" format=\"fullwidth\" id=\"1\" alt=\"where did my image go?\" /></p>",
|
||||
"cost": "Free"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
{% if self.feed_image %}
|
||||
{% image self.feed_image width-200 class="feed-image" %}
|
||||
{% endif %}
|
||||
{{ self.body|richtext }}
|
||||
<p><a href="{% slugurl 'events' %}">Back to events index</a></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,11 @@ class TestMissingImage(TestCase):
|
|||
response = self.client.get('/events/christmas/')
|
||||
self.assertContains(response, '<img src="/media/not-found" width="0" height="0" alt="A missing image" class="feed-image">', html=True)
|
||||
|
||||
def test_rich_text_with_missing_image(self):
|
||||
# the page /events/final-event/ has a missing image in the rich text body
|
||||
response = self.client.get('/events/final-event/')
|
||||
self.assertContains(response, '<img class="richtext-image full-width" src="/media/not-found" width="0" height="0" alt="where did my image go?">', html=True)
|
||||
|
||||
|
||||
class TestFormat(TestCase):
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue