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:
commit
c186bf6b44
1 changed files with 4 additions and 8 deletions
|
@ -310,17 +310,13 @@ class ParametersPermitTest < ActiveSupport::TestCase
|
||||||
refute_predicate merged_params[:person], :empty?
|
refute_predicate merged_params[:person], :empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
test "not permitted is sticky beyond reverse_merge!" do
|
test "not permitted is sticky beyond reverse_merge" do
|
||||||
merged_params = @params.reverse_merge(a: "b")
|
refute_predicate @params.reverse_merge(a: "b"), :permitted?
|
||||||
|
|
||||||
refute_predicate @params, :permitted?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "permitted is sticky beyond reverse_merge!" do
|
test "permitted is sticky beyond reverse_merge" do
|
||||||
@params.permit!
|
@params.permit!
|
||||||
merged_params = @params.reverse_merge(a: "b")
|
assert_predicate @params.reverse_merge(a: "b"), :permitted?
|
||||||
|
|
||||||
assert_predicate @params, :permitted?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "#reverse_merge! with parameters" do
|
test "#reverse_merge! with parameters" do
|
||||||
|
|
Loading…
Reference in a new issue