Skip to content
This repository
Browse code

test for 8018

  • Loading branch information...
commit 92118e7732aa441e60b16bb002a7d76562ce3a88 1 parent 144d747
Aaron Patterson authored December 14, 2012
11  actionpack/test/controller/routing_test.rb
@@ -35,6 +35,17 @@ def setup
35 35
     @escaped = "#{safe.join}#{hex.join}".freeze
36 36
   end
37 37
 
  38
+  def test_match_redirect # GH 8018
  39
+    @set = ActionDispatch::Routing::RouteSet.new
  40
+    @set.draw do
  41
+      match "/myresources" => redirect("/deals"), :via => :get
  42
+    end
  43
+
  44
+    assert_raises ActionController::RoutingError do
  45
+      url_for(@set, :controller => "blargh", :action => "blargh")
  46
+    end
  47
+  end
  48
+
38 49
   def test_route_generation_escapes_unsafe_path_characters
39 50
     assert_equal "/content/act#{@escaped}ion/var#{@escaped}iable/add#{@escaped}itional-1/add#{@escaped}itional-2",
40 51
       url_for(@set, {

0 notes on commit 92118e7

Please sign in to comment.
Something went wrong with that request. Please try again.