aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorAditya Kapoor <adityakapoor.mait@gmail.com>2015-09-27 12:49:20 +0530
committerAditya Kapoor <adityakapoor.mait@gmail.com>2015-09-27 12:49:20 +0530
commitb5e82d99efb073eeb240f8065b2271c2a5ebccdd (patch)
tree23c739225461f34db07d9fdf91fd05d28e2fd8f6 /railties/test
parent210f33c477e950ad44e66b47da794469ce3b5e64 (diff)
downloadrails-b5e82d99efb073eeb240f8065b2271c2a5ebccdd.tar.gz
rails-b5e82d99efb073eeb240f8065b2271c2a5ebccdd.tar.bz2
rails-b5e82d99efb073eeb240f8065b2271c2a5ebccdd.zip
Add missing routing tests for info controller
Vaguely related to #21605 where I proposed to remove index route since it was redirecting to the 'routes' action, but this was kept so I thought it made sense to add some tests regarding this.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/routing_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb
index cbada6be97..cacae13a9b 100644
--- a/railties/test/application/routing_test.rb
+++ b/railties/test/application/routing_test.rb
@@ -21,6 +21,12 @@ module ApplicationTests
assert_equal 200, last_response.status
end
+ test "rails/info in development" do
+ app("development")
+ app "/rails/info"
+ assert_equal 302, last_response.status
+ end
+
test "rails/info/routes in development" do
app("development")
get "/rails/info/routes"
@@ -63,6 +69,12 @@ module ApplicationTests
assert_equal 404, last_response.status
end
+ test "rails/info in production" do
+ app("production")
+ get "/rails/info"
+ assert_equal 404, last_response.status
+ end
+
test "rails/info/routes in production" do
app("production")
get "/rails/info/routes"