diff options
author | alpaca-tc <alpaca-tc@alpaca.tc> | 2017-03-08 18:54:52 +0900 |
---|---|---|
committer | alpaca-tc <alpaca-tc@alpaca.tc> | 2017-03-12 22:38:20 +0900 |
commit | c5f8fe9379dc144a54ceb5663aa449d35d1bf405 (patch) | |
tree | 2fff48e6333d01bf8cc149b837b8e4971e971235 /actionpack/test | |
parent | 4cb8cbd80b0bfedc0fb7033c9f5c41a65312b644 (diff) | |
download | rails-c5f8fe9379dc144a54ceb5663aa449d35d1bf405.tar.gz rails-c5f8fe9379dc144a54ceb5663aa449d35d1bf405.tar.bz2 rails-c5f8fe9379dc144a54ceb5663aa449d35d1bf405.zip |
Fixes ActionController::Rendering#with_defaults
`env` is undefined.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/renderer_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/renderer_test.rb b/actionpack/test/controller/renderer_test.rb index 81b32a67b3..052c974d68 100644 --- a/actionpack/test/controller/renderer_test.rb +++ b/actionpack/test/controller/renderer_test.rb @@ -19,6 +19,16 @@ class RendererTest < ActiveSupport::TestCase assert_equal controller, renderer.controller end + test "creating with new defaults" do + renderer = ApplicationController.renderer + + new_defaults = { https: true } + new_renderer = renderer.with_defaults(new_defaults).new + content = new_renderer.render(inline: "<%= request.ssl? %>") + + assert_equal "true", content + end + test "rendering with a class renderer" do renderer = ApplicationController.renderer content = renderer.render template: "ruby_template" |