test/unittest_rset.py
changeset 8595 01e1e44f1eb3
parent 8087 dc788369d35f
child 8735 5567a5117aeb
--- a/test/unittest_rset.py	Fri Nov 16 11:41:38 2012 +0100
+++ b/test/unittest_rset.py	Fri Nov 16 11:52:06 2012 +0100
@@ -112,6 +112,17 @@
         #                  '%stask/title/go' % baseurl)
         # empty _restpath should not crash
         self.compare_urls(req.build_url('view', _restpath=''), baseurl)
+        self.assertNotIn('https', req.build_url('view', vid='foo', rql='yo',
+                                                  __secure__=True))
+        try:
+            self.config.global_set_option('https-url', 'https://testing.fr/')
+            self.assertTrue('https', req.build_url('view', vid='foo', rql='yo',
+                                                     __secure__=True))
+            self.compare_urls(req.build_url('view', vid='foo', rql='yo',
+                                            __secure__=True),
+                              '%sview?vid=foo&rql=yo' % req.base_url(secure=True))
+        finally:
+            self.config.global_set_option('https-url', None)
 
 
     def test_build(self):