mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-15 12:31:00 +00:00
Added tests for db6bb92
This commit is contained in:
parent
db6bb920fb
commit
4136bb5053
1 changed files with 5 additions and 0 deletions
|
|
@ -188,6 +188,11 @@ class TestPageCreation(TestCase, WagtailTestUtils):
|
|||
self.assertTemplateUsed(response, 'tests/simple_page.html')
|
||||
self.assertContains(response, "New page!")
|
||||
|
||||
# Check that the treebeard attributes were set correctly on the page object
|
||||
self.assertEqual(response.context['self'].depth, self.root_page.depth + 1)
|
||||
self.assertTrue(response.context['self'].path.startswith(self.root_page.path))
|
||||
self.assertEqual(response.context['self'].get_parent(), self.root_page)
|
||||
|
||||
|
||||
class TestPageEdit(TestCase, WagtailTestUtils):
|
||||
def setUp(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue