1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #28378 from y-yagi/use_correct_variable_in_reverse_merge_test

Use correct value in `reverse_merge` test
This commit is contained in:
Eileen M. Uchitelle 2017-03-11 16:33:10 -05:00 committed by GitHub
commit c186bf6b44

View file

@ -310,17 +310,13 @@ class ParametersPermitTest < ActiveSupport::TestCase
refute_predicate merged_params[:person], :empty?
end
test "not permitted is sticky beyond reverse_merge!" do
merged_params = @params.reverse_merge(a: "b")
refute_predicate @params, :permitted?
test "not permitted is sticky beyond reverse_merge" do
refute_predicate @params.reverse_merge(a: "b"), :permitted?
end
test "permitted is sticky beyond reverse_merge!" do
test "permitted is sticky beyond reverse_merge" do
@params.permit!
merged_params = @params.reverse_merge(a: "b")
assert_predicate @params, :permitted?
assert_predicate @params.reverse_merge(a: "b"), :permitted?
end
test "#reverse_merge! with parameters" do