diff options
author | fatkodima <fatkodima123@gmail.com> | 2018-02-17 01:26:36 +0200 |
---|---|---|
committer | fatkodima <fatkodima123@gmail.com> | 2018-02-17 02:44:58 +0200 |
commit | 94a27cb2b5c9b3db8e72d4cbef00ff040b30681d (patch) | |
tree | cb5252da38c5918e6aaf7fcba5219e838a3d13df /actionpack/test | |
parent | 89bcca59e91fa9da941de890012872e8288e77b0 (diff) | |
download | rails-94a27cb2b5c9b3db8e72d4cbef00ff040b30681d.tar.gz rails-94a27cb2b5c9b3db8e72d4cbef00ff040b30681d.tar.bz2 rails-94a27cb2b5c9b3db8e72d4cbef00ff040b30681d.zip |
Fix array routing constraints
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 4222eb4eb7..fe314e26b1 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -4500,7 +4500,7 @@ class TestPortConstraints < ActionDispatch::IntegrationTest get "/integer", to: ok, constraints: { port: 8080 } get "/string", to: ok, constraints: { port: "8080" } - get "/array", to: ok, constraints: { port: [8080] } + get "/array/:idx", to: ok, constraints: { port: [8080], idx: %w[first last] } get "/regexp", to: ok, constraints: { port: /8080/ } end end @@ -4529,7 +4529,10 @@ class TestPortConstraints < ActionDispatch::IntegrationTest get "http://www.example.com/array" assert_response :not_found - get "http://www.example.com:8080/array" + get "http://www.example.com:8080/array/middle" + assert_response :not_found + + get "http://www.example.com:8080/array/first" assert_response :success end |