Commit 28755e2b authored by Alec Wang's avatar Alec Wang

added tests for home directory

parent b0ffdb16
......@@ -67,3 +67,26 @@ class RecipesPagesTests(TestCase):
response = self.client.get('/recipes_detail/')
self.assertContains(response, "Recipes - Detail", html=True)
self.assertTemplateUsed(response, 'recipes_detail.html')
class HomePageTest(TestCase):
def test_homepage(self):
response = self.client.get('/')
self.assertContains(response, "Recipes - Detail", html=True)
self.assertContains(response, "Orders - Detail", html=True)
self.assertContains(response, "Ingredients - Detail", html=True)
self.assertContains(response, "Recipes - Create", html=True)
self.assertContains(response, "Orders - Create", html=True)
self.assertContains(response, "Ingredients - Create", html=True)
self.assertContains(response, "Recipes - Update", html=True)
self.assertContains(response, "Orders - Update", html=True)
self.assertContains(response, "Ingredients - Update", html=True)
self.assertContains(response, "Recipes - List", html=True)
self.assertContains(response, "Orders - List", html=True)
self.assertContains(response, "Ingredients - List", html=True)
self.assertTemplateUsed(response, 'home.html')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment