Merge pull request #47306 from zzak/re-47129
Follow up to HTTP::Request#route_uri_pattern
This commit is contained in:
commit
572f4750f1
@ -146,7 +146,7 @@ def request_method
|
||||
end
|
||||
|
||||
# Returns the URI pattern of the matched route for the request,
|
||||
# using the same format as `bin/rails routes`:
|
||||
# using the same format as <tt>bin/rails routes</tt>:
|
||||
#
|
||||
# request.route_uri_pattern # => "/:controller(/:action(/:id))(.:format)"
|
||||
def route_uri_pattern
|
||||
|
@ -360,6 +360,11 @@ def test_route_uri_pattern
|
||||
"/:controller(/:action(/:id))(.:format)",
|
||||
controller.request.route_uri_pattern
|
||||
)
|
||||
|
||||
assert_equal(
|
||||
"/:controller(/:action(/:id))(.:format)",
|
||||
controller.request.get_header("action_dispatch.route_uri_pattern")
|
||||
)
|
||||
end
|
||||
|
||||
def test_route_with_colon_first
|
||||
|
Loading…
Reference in New Issue
Block a user