aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-30 11:01:00 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-06-03 11:33:50 -0700
commit16e210745cc66de971cfb422b27c6f39b9201680 (patch)
treeebcc66ff1328936b4afd485c4fa8abd5051bbacb /actionpack/test/dispatch/routing_test.rb
parent57d0da86b4ee35c254dce3b7ea926b09871e517b (diff)
downloadrails-16e210745cc66de971cfb422b27c6f39b9201680.tar.gz
rails-16e210745cc66de971cfb422b27c6f39b9201680.tar.bz2
rails-16e210745cc66de971cfb422b27c6f39b9201680.zip
test with an empty via
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 6826e5906d..7dd19ae855 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -2250,6 +2250,14 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
end
+ def test_match_with_empty_via
+ assert_raises(ArgumentError) do
+ draw do
+ match '/foo/bar', :to => 'files#show', :via => []
+ end
+ end
+ end
+
def test_glob_parameter_accepts_regexp
draw do
get '/:locale/*file.:format', :to => 'files#show', :file => /path\/to\/existing\/file/