From 80c7038bbc8e83762f4396b18260f470d8621995 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Tue, 8 Jan 2019 22:21:20 +0100 Subject: Revert "Merge pull request #34387 from yhirano55/rails_info_properties_json" We had a discussion on the Core team and we don't want to expose this information as a JSON endpoint and not by default. It doesn't make sense to expose this JSON locally and this controller is only accessible in dev, so the proposed access from a production app seems off. This reverts commit 8eaffe7e89719ac62ff29c2e4208cfbeb1cd1c38, reversing changes made to 133e0ba33db5887b047c9ac8233e5b414657bca5. --- railties/test/rails_info_controller_test.rb | 5 ----- railties/test/rails_info_test.rb | 12 ------------ 2 files changed, 17 deletions(-) (limited to 'railties/test') diff --git a/railties/test/rails_info_controller_test.rb b/railties/test/rails_info_controller_test.rb index 6ab68f8333..878a238f8d 100644 --- a/railties/test/rails_info_controller_test.rb +++ b/railties/test/rails_info_controller_test.rb @@ -50,11 +50,6 @@ class InfoControllerTest < ActionController::TestCase assert_select "table" end - test "info controller renders json with properties" do - get :properties, format: :json - assert_equal Rails::Info.to_json, response.body - end - test "info controller renders with routes" do get :routes assert_response :success diff --git a/railties/test/rails_info_test.rb b/railties/test/rails_info_test.rb index d167a86e56..50522c1be6 100644 --- a/railties/test/rails_info_test.rb +++ b/railties/test/rails_info_test.rb @@ -43,18 +43,6 @@ class InfoTest < ActiveSupport::TestCase end end - def test_json_includes_middleware - Rails::Info.module_eval do - property "Middleware", ["Rack::Lock", "Rack::Static"] - end - - hash = JSON.parse(Rails::Info.to_json) - assert_includes hash.keys, "Middleware" - properties.value_for("Middleware").each do |value| - assert_includes hash["Middleware"], value - end - end - private def properties Rails::Info.properties -- cgit v1.2.3