mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Current tests are testing stickiness of non-permitted parameters
This commit is contained in:
parent
5b3b9b0ebc
commit
93eaffe59b
1 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ class ParametersPermitTest < ActiveSupport::TestCase
|
|||
assert_equal "monkey", @params.fetch(:foo) { "monkey" }
|
||||
end
|
||||
|
||||
test "permitted is sticky on accessors" do
|
||||
test "not permitted is sticky on accessors" do
|
||||
assert !@params.slice(:person).permitted?
|
||||
assert !@params[:person][:name].permitted?
|
||||
|
||||
|
@ -31,12 +31,12 @@ class ParametersPermitTest < ActiveSupport::TestCase
|
|||
assert !@params.values_at(:person).first.permitted?
|
||||
end
|
||||
|
||||
test "permitted is sticky on mutators" do
|
||||
test "not permitted is sticky on mutators" do
|
||||
assert !@params.delete_if { |k| k == "person" }.permitted?
|
||||
assert !@params.keep_if { |k,v| k == "person" }.permitted?
|
||||
end
|
||||
|
||||
test "permitted is sticky beyond merges" do
|
||||
test "not permitted is sticky beyond merges" do
|
||||
assert !@params.merge(a: "b").permitted?
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue