-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow named groups in regexp URI matches.
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Feature: Issue 51 | ||
In order to make sure issue #51 (https://github.com/peej/tonic/issues/51) is fixed | ||
As a Tonic developer | ||
I want to test the problems in the issue | ||
|
||
Scenario: URL template variable should only match a single URL segment | ||
Given a resource definition "issue51" with URI "/issue51/(?P<child>.+)" and priority of 1 | ||
And the request URI of "/issue51/1/a" | ||
When I create an application object | ||
And I create a request object | ||
And load the resource | ||
Then the loaded resource should have a class of "issue51" | ||
And the loaded resource should have a param "child" with the value "1/a" | ||
|
||
Scenario: URL template variable should only match a single URL segment | ||
Given a resource definition "issue51c" with URI "/issue51c/(.+)" and priority of 1 | ||
And the request URI of "/issue51c/1/a" | ||
When I create an application object | ||
And I create a request object | ||
And load the resource | ||
Then the loaded resource should have a class of "issue51c" | ||
And the loaded resource should have a param "0" with the value "1/a" | ||
|
||
Scenario: URL template variable should only match a single URL segment | ||
Given a resource definition "issue51b" with URI "/issue51b/{child}" and priority of 1 | ||
And the request URI of "/issue51b/1a" | ||
When I create an application object | ||
And I create a request object | ||
And load the resource | ||
Then the loaded resource should have a class of "issue51b" | ||
And the loaded resource should have a param "child" with the value "1a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters