Skip to content

Commit aa5bdb6

Browse files
committed
Add test for the search view.
1 parent 22f71f1 commit aa5bdb6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mezzanine/core/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ def test_search(self):
159159
self.assertEqual(len(results), 2)
160160
if results:
161161
self.assertEqual(results[0].id, second)
162+
# Test the actual search view.
163+
response = self.client.get(reverse("search") + "?q=test")
164+
self.assertEqual(response.status_code, 200)
162165

163166
def _create_page(self, title, status):
164167
return RichTextPage.objects.create(title=title, status=status)

0 commit comments

Comments
 (0)