From 16e210745cc66de971cfb422b27c6f39b9201680 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 30 May 2014 11:01:00 -0700 Subject: test with an empty via --- actionpack/test/dispatch/routing_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack') 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/ -- cgit v1.2.3