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.
Updated by The Foreman Bot almost 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4210 added
Updated by Dominic Cleal almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 764ae7e0c733e15cd7a26d68902063aab92f4ef4.
Updated by Dominic Cleal almost 8 years ago
- Translation missing: en.field_release set to 209
Actions