Actions
Refactor #18199
closedHostgroupsControllerTest empty parameter values test should pass "", not nil in request
Description
The test "HostgroupsControllerTest::parent attributes#test_0003_updates a hostgroup with a parent parameter, allows empty values" passes an empty parameter field in the request using nil
, but for a UI form-encoded request it should be ""
(empty string). The UI will not generate (and cannot pass) a nil value.
This fails under Rails 5.0.1 where the test request is form encoded and nil is converted to an empty string rather than being passed as nil
on Rails 4.2. The assertion checking that the parameter is set to nil
then fails.
HostgroupsControllerTest::parent attributes#test_0003_updates a hostgroup with a parent parameter, allows empty values [test/controllers/hostgroups_controller_test.rb:210]:
Expected: nil
Actual: ""
Actions