Merge pull request #44337 from paulhenri-l/patch-1

Fix empty request inside helpers test
This commit is contained in:
Ryuta Kamizono 2022-02-09 17:33:40 +09:00 committed by GitHub
commit 135f41d0b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

@ -57,7 +57,7 @@ module Behavior
include ActiveSupport::Testing::ConstantLookup
delegate :lookup_context, to: :controller
attr_accessor :controller, :output_buffer, :rendered
attr_accessor :controller, :request, :output_buffer, :rendered
module ClassMethods
def tests(helper_class)

@ -52,6 +52,10 @@ class GeneralViewTest < ActionView::TestCase
assert params.is_a? ActionController::Parameters
end
test "exposes request" do
assert request.is_a? ActionDispatch::Request
end
test "exposes view as _view for backwards compatibility" do
assert_same _view, view
end