From c94754e2f0bc488907157382ece309baf4ddb1b0 Mon Sep 17 00:00:00 2001 From: Petri Avikainen Date: Sun, 3 Feb 2019 23:34:02 +0200 Subject: Define word boundary for unanchored path regexp --- actionpack/test/dispatch/mount_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test/dispatch') diff --git a/actionpack/test/dispatch/mount_test.rb b/actionpack/test/dispatch/mount_test.rb index f6cf653980..e42ea89f6f 100644 --- a/actionpack/test/dispatch/mount_test.rb +++ b/actionpack/test/dispatch/mount_test.rb @@ -80,6 +80,12 @@ class TestRoutingMount < ActionDispatch::IntegrationTest assert_equal "/shorthand -- /omg", response.body end + def test_mounting_does_not_match_similar_paths + get "/shorthandomg" + assert_not_equal "/shorthand -- /omg", response.body + assert_equal " -- /shorthandomg", response.body + end + def test_mounting_works_with_via get "/getfake" assert_equal "OK", response.body -- cgit v1.2.3