aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/journey/router_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make URL escaping more consistentAndrew White2014-04-201-1/+12
| | | | | | | | | | | | | | | | | | | | | | 1. Escape '%' characters in URLs - only unescaped data should be passed to URL helpers 2. Add an `escape_segment` helper to `Router::Utils` that escapes '/' characters 3. Use `escape_segment` rather than `escape_fragment` in optimized URL generation 4. Use `escape_segment` rather than `escape_path` in URL generation For point 4 there are two exceptions. Firstly, when a route uses wildcard segments (e.g. *foo) then we use `escape_path` as the value may contain '/' characters. This means that wildcard routes can't be optimized. Secondly, if a `:controller` segment is used in the path then this uses `escape_path` as the controller may be namespaced. Fixes #14629, #14636 and #14070.
* Skip Rack applications and redirects when generating urlsAndrew White2013-07-161-9/+13
| | | | | | | | | | When generating an unnamed url (i.e. using `url_for` with an options hash) we should skip anything other than standard Rails routes otherwise it will match the first mounted application or redirect and generate a url with query parameters rather than raising an error if the options hash doesn't match any defined routes. Fixes #8018
* Raise correct exception now Journey is integrated.Andrew White2013-01-151-4/+4
| | | | | | | Now that Journey has been integrated into ActionDispatch we can raise the exception ActionController::UrlGenerationError directly rather than raising the internal Journey::Router::RoutingError and then have ActionDispatch::Routing::RouteSet#generate re-raise the exception.
* Use ActiveSupport::TestCase in the journey testsRafael Mendonça França2012-12-311-1/+1
|
* Alias refute methods to assert_not and perfer assert_not on testsRafael Mendonça França2012-12-311-1/+1
|
* Integrate Journey into Action DispatchAndrew White2012-12-191-0/+575
Move the Journey code underneath the ActionDispatch namespace so that we don't pollute the global namespace with names that may be used for models. Fixes rails/journey#49.