Actions
Bug #18159
closedTest sets @request.session to nil, should use #clear
Description
The "UsersControllerTest#test_0023_should create and login external user" test attempts to use an empty session for a request by setting @request.session
to nil, but this causes an error inside the Rails test cases under Rails 5.0.0 or higher.
NoMethodError: undefined method `update' for nil:NilClass
actionpack (5.0.0) lib/action_controller/test_case.rb:516:in `process'
apipie-rails (0.3.6) lib/apipie/extractor/recorder.rb:153:in `process_with_api_recording'
rails-controller-testing (0.1.1) lib/rails/controller/testing/template_assertions.rb:61:in `process'
actionpack (5.0.0) lib/action_controller/test_case.rb:634:in `process_with_kwargs'
actionpack (5.0.0) lib/action_controller/test_case.rb:381:in `get'
test/controllers/users_controller_test.rb:230:in `block in <class:UsersControllerTest>'
The correct method of emptying a session is to use #clear
rather than removing it from the request object.
Actions