aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_base
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2016-01-25 11:23:48 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2016-01-25 11:23:48 -0800
commit3b4398bb605cc7b6f475bf76c19aa0702700a199 (patch)
tree13285c577d9b6aff2fde072a2030b0468a775423 /actionpack/test/controller/new_base
parentd25e79fba6090d56769da6f0fbb401bb1afdb28a (diff)
parent8d86637fb64ae8ae81ab71a286ddba02cc3144a4 (diff)
downloadrails-3b4398bb605cc7b6f475bf76c19aa0702700a199.tar.gz
rails-3b4398bb605cc7b6f475bf76c19aa0702700a199.tar.bz2
rails-3b4398bb605cc7b6f475bf76c19aa0702700a199.zip
Merge branch '3-2-sec' into 3-2-stable
* 3-2-sec: bumping version allow :file to be outside rails root, but anything else must be inside the rails view directory Don't short-circuit reject_if proc stop caching mime types globally use secure string comparisons for basic auth username / password
Diffstat (limited to 'actionpack/test/controller/new_base')
-rw-r--r--actionpack/test/controller/new_base/render_file_test.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/actionpack/test/controller/new_base/render_file_test.rb b/actionpack/test/controller/new_base/render_file_test.rb
index a961cbf849..c0e23db457 100644
--- a/actionpack/test/controller/new_base/render_file_test.rb
+++ b/actionpack/test/controller/new_base/render_file_test.rb
@@ -72,13 +72,23 @@ module RenderFile
end
test "rendering a relative path" do
- get :relative_path
- assert_response "The secret is in the sauce\n"
+ begin
+ ActionView::PathResolver.allow_external_files = true
+ get :relative_path
+ assert_response "The secret is in the sauce\n"
+ ensure
+ ActionView::PathResolver.allow_external_files = false
+ end
end
test "rendering a relative path with dot" do
- get :relative_path_with_dot
- assert_response "The secret is in the sauce\n"
+ begin
+ ActionView::PathResolver.allow_external_files = true
+ get :relative_path_with_dot
+ assert_response "The secret is in the sauce\n"
+ ensure
+ ActionView::PathResolver.allow_external_files = false
+ end
end
test "rendering a Pathname" do