diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-04-15 18:12:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-15 18:12:57 -0400 |
commit | 60afbfffdcdb4510deccf8d6db303dd4260e3dc7 (patch) | |
tree | 52f935d8d5dcdece3b8eda0e49448fcfc9868831 /actionpack/test/journey/path | |
parent | fbb8b68403ff8663a561b20746e9da7719eeb83e (diff) | |
parent | 64ed91f5aad74cdfa93dc08c2f5899a8e0555f4c (diff) | |
download | rails-60afbfffdcdb4510deccf8d6db303dd4260e3dc7.tar.gz rails-60afbfffdcdb4510deccf8d6db303dd4260e3dc7.tar.bz2 rails-60afbfffdcdb4510deccf8d6db303dd4260e3dc7.zip |
Merge pull request #35975 from xithan/master
mounted routes with non-word characters
Diffstat (limited to 'actionpack/test/journey/path')
-rw-r--r-- | actionpack/test/journey/path/pattern_test.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/actionpack/test/journey/path/pattern_test.rb b/actionpack/test/journey/path/pattern_test.rb index 2f39abcb92..77c19369b0 100644 --- a/actionpack/test/journey/path/pattern_test.rb +++ b/actionpack/test/journey/path/pattern_test.rb @@ -34,17 +34,17 @@ module ActionDispatch end { - "/:controller(/:action)" => %r{\A/(#{x})(?:/([^/.?]+))?(?:\b|\Z)}, - "/:controller/foo" => %r{\A/(#{x})/foo(?:\b|\Z)}, - "/:controller/:action" => %r{\A/(#{x})/([^/.?]+)(?:\b|\Z)}, - "/:controller" => %r{\A/(#{x})(?:\b|\Z)}, - "/:controller(/:action(/:id))" => %r{\A/(#{x})(?:/([^/.?]+)(?:/([^/.?]+))?)?(?:\b|\Z)}, - "/:controller/:action.xml" => %r{\A/(#{x})/([^/.?]+)\.xml(?:\b|\Z)}, - "/:controller.:format" => %r{\A/(#{x})\.([^/.?]+)(?:\b|\Z)}, - "/:controller(.:format)" => %r{\A/(#{x})(?:\.([^/.?]+))?(?:\b|\Z)}, - "/:controller/*foo" => %r{\A/(#{x})/(.+)(?:\b|\Z)}, - "/:controller/*foo/bar" => %r{\A/(#{x})/(.+)/bar(?:\b|\Z)}, - "/:foo|*bar" => %r{\A/(?:([^/.?]+)|(.+))(?:\b|\Z)}, + "/:controller(/:action)" => %r{\A/(#{x})(?:/([^/.?]+))?(?:\b|\Z|/)}, + "/:controller/foo" => %r{\A/(#{x})/foo(?:\b|\Z|/)}, + "/:controller/:action" => %r{\A/(#{x})/([^/.?]+)(?:\b|\Z|/)}, + "/:controller" => %r{\A/(#{x})(?:\b|\Z|/)}, + "/:controller(/:action(/:id))" => %r{\A/(#{x})(?:/([^/.?]+)(?:/([^/.?]+))?)?(?:\b|\Z|/)}, + "/:controller/:action.xml" => %r{\A/(#{x})/([^/.?]+)\.xml(?:\b|\Z|/)}, + "/:controller.:format" => %r{\A/(#{x})\.([^/.?]+)(?:\b|\Z|/)}, + "/:controller(.:format)" => %r{\A/(#{x})(?:\.([^/.?]+))?(?:\b|\Z|/)}, + "/:controller/*foo" => %r{\A/(#{x})/(.+)(?:\b|\Z|/)}, + "/:controller/*foo/bar" => %r{\A/(#{x})/(.+)/bar(?:\b|\Z|/)}, + "/:foo|*bar" => %r{\A/(?:([^/.?]+)|(.+))(?:\b|\Z|/)}, }.each do |path, expected| define_method(:"test_to_non_anchored_regexp_#{Regexp.escape(path)}") do path = Pattern.build( |