diff --git a/src/lists/tests.py b/src/lists/tests.py index 10a554c..83eda0f 100644 --- a/src/lists/tests.py +++ b/src/lists/tests.py @@ -43,6 +43,16 @@ class HomePageTest(TestCase): self.assertIn('itemey 1', response.content.decode()) self.assertIn('itemey 2', response.content.decode()) +class ListViewTest(TestCase): + + def test_displays_all_items(self): + Item.objects.create(text="itemey 1") + Item.objects.create(text="itemey 2") + + response = self.client.get('/lists/the-only-list-in-the-world') + + self.assertIn('itemey 1', response.content.decode()) + self.assertIn('itemey 2', response.content.decode()) class ItemModelTest(TestCase):