From 70b995a77f3e47c24ae88509066d0cdc4b2d779e Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Tue, 2 Aug 2016 16:52:18 +0200 Subject: Fix wrong assignment. Screwed up both the left and right hand sides! --- actionpack/test/controller/parameters/serialization_test.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'actionpack') diff --git a/actionpack/test/controller/parameters/serialization_test.rb b/actionpack/test/controller/parameters/serialization_test.rb index 352dd8ffb7..c9d38c1f48 100644 --- a/actionpack/test/controller/parameters/serialization_test.rb +++ b/actionpack/test/controller/parameters/serialization_test.rb @@ -4,16 +4,17 @@ require 'active_support/core_ext/string/strip' class ParametersSerializationTest < ActiveSupport::TestCase setup do - @old_permitted_parameters = ActionController::Parameters.always_permitted_parameters - ActionController::Parameters.always_permitted_parameters = true + @old_permitted_parameters = ActionController::Parameters.permit_all_parameters + ActionController::Parameters.permit_all_parameters = false end teardown do - ActionController::Parameters.always_permitted_parameters = @old_permitted_parameters + ActionController::Parameters.permit_all_parameters = @old_permitted_parameters end test 'yaml serialization' do - assert_equal <<-end_of_yaml.strip_heredoc, YAML.dump(ActionController::Parameters.new(key: :value)) + params = ActionController::Parameters.new(key: :value) + assert_equal <<-end_of_yaml.strip_heredoc, YAML.dump(params) --- !ruby/object:ActionController::Parameters parameters: !ruby/hash:ActiveSupport::HashWithIndifferentAccess key: :value -- cgit v1.2.3