diff options
author | Ben Bangert <ben@groovie.org> | 2010-02-28 15:33:42 -0800 |
---|---|---|
committer | Ben Bangert <ben@groovie.org> | 2010-02-28 15:33:42 -0800 |
commit | 93adcc44b9de85012f3c79360c949f5a8fa69c1d (patch) | |
tree | ae618ed87ea4f4e395632352c4ec7d7ac73f944b /tests | |
parent | acc95ed092e9efe366f89ef92f6d7d975e3aa12a (diff) | |
download | routes-93adcc44b9de85012f3c79360c949f5a8fa69c1d.tar.gz |
* Fix bug with relative URL's using qualified merging host and URL without
including the appropriate slash. Fixes #13.
--HG--
branch : trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_functional/test_generation.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_functional/test_generation.py b/tests/test_functional/test_generation.py index 68b6cba..1e379c7 100644 --- a/tests/test_functional/test_generation.py +++ b/tests/test_functional/test_generation.py @@ -22,6 +22,17 @@ class TestGeneration(unittest.TestCase): eq_('/hi/show', m.generate(fred='show')) eq_('/hi/list%20people', m.generate(fred='list people')) eq_(None, m.generate()) + + def test_relative_url(self): + m = Mapper(explicit=False) + m.minimization = True + m.environ = dict(HTTP_HOST='localhost') + url = URLGenerator(m, m.environ) + m.connect(':controller/:action/:id') + m.create_regs(['content','blog','admin/comments']) + + eq_('about', url('about')) + eq_('http://localhost/about', url('about', qualified=True)) def test_basic_dynamic_explicit_use(self): m = Mapper() |