diff options
Diffstat (limited to 'actionpack/test/controller/new_base/render_body_test.rb')
-rw-r--r-- | actionpack/test/controller/new_base/render_body_test.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/test/controller/new_base/render_body_test.rb b/actionpack/test/controller/new_base/render_body_test.rb index f4a3db8b41..d0b61f0665 100644 --- a/actionpack/test/controller/new_base/render_body_test.rb +++ b/actionpack/test/controller/new_base/render_body_test.rb @@ -1,4 +1,6 @@ -require 'abstract_unit' +# frozen_string_literal: true + +require "abstract_unit" module RenderBody class MinimalController < ActionController::Metal @@ -66,7 +68,7 @@ module RenderBody end def with_custom_content_type - response.headers['Content-Type'] = 'application/json' + response.headers["Content-Type"] = "application/json" render body: '["troll","face"]' end @@ -85,7 +87,7 @@ module RenderBody test "rendering body from an action with default options renders the body with the layout" do with_routing do |set| - set.draw { get ':controller', action: 'index' } + set.draw { ActiveSupport::Deprecation.silence { get ":controller", action: "index" } } get "/render_body/simple" assert_body "hello david" @@ -95,7 +97,7 @@ module RenderBody test "rendering body from an action with default options renders the body without the layout" do with_routing do |set| - set.draw { get ':controller', action: 'index' } + set.draw { ActiveSupport::Deprecation.silence { get ":controller", action: "index" } } get "/render_body/with_layout" @@ -150,7 +152,7 @@ module RenderBody get "/render_body/with_layout/with_custom_content_type" assert_equal %w{ troll face }, JSON.parse(response.body) - assert_equal 'application/json', response.headers['Content-Type'] + assert_equal "application/json", response.headers["Content-Type"] end test "rendering body with layout: false" do |