Commit e29f11e9 authored by Santino Campos's avatar Santino Campos

Write unit tests for views for recipes model

parent cf1c908b
...@@ -21,3 +21,22 @@ class IngredientViewTest(TestCase): ...@@ -21,3 +21,22 @@ class IngredientViewTest(TestCase):
self.assertTemplateUsed(response, 'ingredients_create_form.html') self.assertTemplateUsed(response, 'ingredients_create_form.html')
class RecipesViewTest(TestCase):
def test_recipes_list_view_returns_proper_template(self):
response = self.client.get('/recipes/list')
self.assertTemplateUsed(response, 'recipes_list.html')
def test_recipes_detail_view_returns_proper_template(self):
response = self.client.get('/recipes/detail')
self.assertTemplateUsed(response, 'recipes_detail.html')
def test_recipes_update_form_returns_proper_template(self):
response = self.client.get('/recipes/update')
self.assertTemplateUsed(response, 'recipes_update_form.html')
def test_recipes_create_form_view_returns_proper_template(self):
response = self.client.get('/recipes/create')
self.assertTemplateUsed(response, 'recipes_create_form.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