summaryrefslogtreecommitdiff
path: root/pyramid/tests/test_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyramid/tests/test_config.py')
-rw-r--r--pyramid/tests/test_config.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyramid/tests/test_config.py b/pyramid/tests/test_config.py
index d7e62da0a..84848c2ad 100644
--- a/pyramid/tests/test_config.py
+++ b/pyramid/tests/test_config.py
@@ -1998,6 +1998,13 @@ class ConfiguratorTests(unittest.TestCase):
self._assertRoute(config, 'name', 'path')
self.assertEqual(route.name, 'name')
+ def test_add_route_discriminator(self):
+ config = self._makeOne()
+ route = config.add_route('name', 'path')
+ self._assertRoute(config, 'name', 'path')
+ self.assertEqual(route.name, 'name')
+ self.assertEqual(config._ctx.actions[-1][0], ('route', 'name'))
+
def test_add_route_with_factory(self):
config = self._makeOne(autocommit=True)
factory = object()