Actions
Refactor #18976
closedHostsControllerTest REMOTE_USER tests should not assume format of subsequent requests
Description
Under Rails 5.0, two HostsControllerTest tests fails:
HostsControllerTest#test_0037_if only authorize_login_delegation is set, REMOTE_USER should be
ignored for API requests [test/controllers/hosts_controller_test.rb:617]:
Expected response to be a <2XX: success>, but was a <401: Unauthorized>
When making a JSON format request followed by a request with no explicit format, Rails 5 is now memorising that it's requesting application/json instead of resetting to HTML or similar.
This is not a bug in Rails 5, as it shouldn't be assumed that the state will be reset between requests in a single test case: https://github.com/rails/rails/commit/33db42168425866b714203e35a3a36693983b3f9
The format should be set explicitly or moved into separate tests with a common setup.
Updated by The Foreman Bot over 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4395 added
Updated by Dominic Cleal over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 0bb4a75c0025cbb0ef29c0e3a029d1fe44b864cd.
Updated by Ohad Levy over 7 years ago
- Translation missing: en.field_release set to 209
Actions