kopia lustrzana https://github.com/wagtail/wagtail
Added test for #429
rodzic
5b99f38927
commit
adb8141a50
|
@ -43,3 +43,17 @@ class TestSendEmailTask(TestCase):
|
|||
self.assertEqual(mail.outbox[0].subject, "Test subject")
|
||||
self.assertEqual(mail.outbox[0].body, "Test content")
|
||||
self.assertEqual(mail.outbox[0].to, ["nobody@email.com"])
|
||||
|
||||
|
||||
class TestExplorerNavView(TestCase, WagtailTestUtils):
|
||||
def setUp(self):
|
||||
self.homepage = Page.objects.get(id=2).specific
|
||||
self.login()
|
||||
|
||||
def test_explorer_nav_view(self):
|
||||
response = self.client.get(reverse('wagtailadmin_explorer_nav'))
|
||||
|
||||
# Check response
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed('wagtailadmin/shared/explorer_nav.html')
|
||||
self.assertEqual(response.context['nodes'][0][0], self.homepage)
|
||||
|
|
Ładowanie…
Reference in New Issue