diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/route_inspect_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/test/application/route_inspect_test.rb b/railties/test/application/route_inspect_test.rb index 94871c3759..31af1ca6dc 100644 --- a/railties/test/application/route_inspect_test.rb +++ b/railties/test/application/route_inspect_test.rb @@ -152,5 +152,14 @@ module ApplicationTests assert_no_match(/RackApp/, output.first) assert_no_match(/\/sprockets/, output.first) end + + def test_redirect + output = draw do + match '/foo' => redirect("/bar") + match '/foo2' => redirect("/bar", status: 307) + end + assert_equal " foo /foo(.:format) Redirect (301)", output[0] + assert_equal "foo2 /foo2(.:format) Redirect (307)", output[1] + end end end |