Add test for linked_objects being output when deletion is disallowed

Required as a prerequisite for making this code Django-1.10 compatible,
as per https://github.com/torchbox/wagtail/issues/2723#issuecomment-227241446
This commit is contained in:
Matt Westcott 2016-06-28 14:43:26 +01:00
parent 865841eedf
commit 810952cfc8

View file

@ -302,6 +302,10 @@ class TestDeleteViewWithProtectedRelation(TestCase, WagtailTestUtils):
response,
"'J. R. R. Tolkien' is currently referenced by other objects"
)
self.assertContains(
response,
"<li><b>Book:</b> The Lord of the Rings</li>"
)
# Author not deleted
self.assertTrue(Author.objects.filter(id=1).exists())