Merge pull request #47306 from zzak/re-47129

Follow up to HTTP::Request#route_uri_pattern
This commit is contained in:
Jean Boussier 2023-12-11 18:39:05 +01:00 committed by GitHub
commit 572f4750f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

@ -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