Merge pull request #22 from Useclark/seq-replacement

Add a test for parameters replacing all at once to prevent colon conflicts
pull/27/head
Johannes Jörg Schmidt 9 years ago
commit 6bfed7c7da

@ -19,6 +19,14 @@ test('two named parameters', function(t) {
t.end();
});
test('named parameters replaced all at once', function(t) {
var page = docuri.route('page/:id/:bar');
t.equal(page({ id: ':bar', bar: 'foo' }), 'page/:bar/foo', 'url built correctly, no conflicts', { todo: true });
t.end();
});
test('named parameter followed by optional parameter', function(t) {
var page = docuri.route('page/:id(/:optional)');

Loading…
Cancel
Save