kopia lustrzana https://github.com/wagtail/wagtail
add failing test for #801
rodzic
ff0c6db322
commit
d4a9f14e41
|
@ -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):
|
||||
|
|
Ładowanie…
Reference in New Issue