diff options
-rw-r--r-- | railties/lib/rails/application.rb | 5 | ||||
-rw-r--r-- | railties/test/application/build_original_fullpath_test.rb | 27 |
2 files changed, 0 insertions, 32 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index ad6ec1264d..e9683d4a95 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -505,11 +505,6 @@ module Rails default_stack.build_stack end - def build_original_fullpath(env) #:nodoc: - req = ActionDispatch::Request.new env - env["ORIGINAL_FULLPATH"] = req.fullpath - end - def validate_secret_key_config! #:nodoc: if secrets.secret_key_base.blank? ActiveSupport::Deprecation.warn "You didn't set `secret_key_base`. " + diff --git a/railties/test/application/build_original_fullpath_test.rb b/railties/test/application/build_original_fullpath_test.rb deleted file mode 100644 index 647ffb097a..0000000000 --- a/railties/test/application/build_original_fullpath_test.rb +++ /dev/null @@ -1,27 +0,0 @@ -require "abstract_unit" - -module ApplicationTests - class BuildOriginalPathTest < ActiveSupport::TestCase - def test_include_original_PATH_info_in_ORIGINAL_FULLPATH - env = { 'PATH_INFO' => '/foo/' } - assert_equal "/foo/", Rails.application.send(:build_original_fullpath, env) - end - - def test_include_SCRIPT_NAME - env = { - 'SCRIPT_NAME' => '/foo', - 'PATH_INFO' => '/bar' - } - - assert_equal "/foo/bar", Rails.application.send(:build_original_fullpath, env) - end - - def test_include_QUERY_STRING - env = { - 'PATH_INFO' => '/foo', - 'QUERY_STRING' => 'bar', - } - assert_equal "/foo?bar", Rails.application.send(:build_original_fullpath, env) - end - end -end |