Commit d11f0009 authored by Michal Čihař's avatar Michal Čihař

Test search pagination

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent bcdc5be4
...@@ -102,6 +102,32 @@ class SearchViewTest(ViewTestCase): ...@@ -102,6 +102,32 @@ class SearchViewTest(ViewTestCase):
'xxx is not one of the available choices.' 'xxx is not one of the available choices.'
) )
def test_pagination(self):
response = self.client.get(
reverse('search'),
{'q': 'hello', 'page': 1}
)
self.assertContains(
response,
'<span class="hlmatch">Hello</span>, world'
)
response = self.client.get(
reverse('search'),
{'q': 'hello', 'page': 10}
)
self.assertContains(
response,
'<span class="hlmatch">Hello</span>, world'
)
response = self.client.get(
reverse('search'),
{'q': 'hello', 'page': 'x'}
)
self.assertContains(
response,
'<span class="hlmatch">Hello</span>, world'
)
def test_language_search(self): def test_language_search(self):
''' '''
Searching in all projects. Searching in all projects.
......
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