diff --git a/test/test_routes.py b/test/test_routes.py index efd1c58..4aaaf68 100644 --- a/test/test_routes.py +++ b/test/test_routes.py @@ -36,6 +36,11 @@ def test_ddg_bang(client): assert rv._status_code == 302 assert rv.headers.get('Location').startswith('https://www.reddit.com') + # Move '!' to end of the bang + rv = client.get('/search?q=gitlab%20w!') + assert rv._status_code == 302 + assert rv.headers.get('Location').startswith('https://en.wikipedia.org') + # Ensure bang is case insensitive rv = client.get('/search?q=!GH%20whoogle') assert rv._status_code == 302