summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Bangert <ben@groovie.org>2010-02-28 15:33:42 -0800
committerBen Bangert <ben@groovie.org>2010-02-28 15:33:42 -0800
commit93adcc44b9de85012f3c79360c949f5a8fa69c1d (patch)
treeae618ed87ea4f4e395632352c4ec7d7ac73f944b /tests
parentacc95ed092e9efe366f89ef92f6d7d975e3aa12a (diff)
downloadroutes-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.py11
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()