Revision 0a54c7f8
Added by Dominic Cleal over 7 years ago
test/controllers/concerns/parameters/nic_interface_test.rb | ||
---|---|---|
filtered = nic_interface_params
|
||
|
||
assert_equal 'test.example.com', filtered['name']
|
||
assert_equal({'foo' => 'bar', 'memory' => 2}, filtered['compute_attributes'])
|
||
assert_equal({'foo' => 'bar', 'memory' => 2}, filtered['compute_attributes'].to_h)
|
||
assert filtered.permitted?
|
||
end
|
||
|
Also available in: Unified diff
fixes #18665 - call #to_h before comparing AC::Parameters to hash
Allows comparisons when ActionController::Parameters is separated from
Hash in Rails 5.0. #permit! is now called on inner hashes sent through
KeepParam (similar to rails/rails@e86524c in 5.1) so they are included
in the #to_h permitted output.