aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-30 11:00:00 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-06-03 11:33:50 -0700
commit57d0da86b4ee35c254dce3b7ea926b09871e517b (patch)
treec80a7fd8d90f9a32e16fc1aa0a25917ed4ebcda9 /actionpack/test/dispatch/routing_test.rb
parentc91648b107a967123e523393962e92f89e989dcf (diff)
downloadrails-57d0da86b4ee35c254dce3b7ea926b09871e517b.tar.gz
rails-57d0da86b4ee35c254dce3b7ea926b09871e517b.tar.bz2
rails-57d0da86b4ee35c254dce3b7ea926b09871e517b.zip
add a test for missing "via" parameter
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 d6477e19bb..6826e5906d 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -2242,6 +2242,14 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal '/api/1.0/users/first.last.xml', api_user_path(:version => '1.0', :id => 'first.last', :format => :xml)
end
+ def test_match_without_via
+ assert_raises(ArgumentError) do
+ draw do
+ match '/foo/bar', :to => 'files#show'
+ end
+ end
+ end
+
def test_glob_parameter_accepts_regexp
draw do
get '/:locale/*file.:format', :to => 'files#show', :file => /path\/to\/existing\/file/