Permalink
Browse files

Fix buggy tests

  • Loading branch information...
1 parent a911d74 commit 5b3b9b0ebcbe35038adaf7b1636032e6f436ed1c @bquorning bquorning committed Nov 6, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/test/controller/parameters/parameters_permit_test.rb
@@ -24,16 +24,16 @@ class ParametersPermitTest < ActiveSupport::TestCase
assert !@params.slice(:person).permitted?
assert !@params[:person][:name].permitted?
- @params.each { |key, value| assert(value.permitted?) if key == :person }
+ @params.each { |key, value| assert(!value.permitted?) if key == "person" }
assert !@params.fetch(:person).permitted?
assert !@params.values_at(:person).first.permitted?
end
test "permitted is sticky on mutators" do
- assert !@params.delete_if { |k| k == :person }.permitted?
- assert !@params.keep_if { |k,v| k == :person }.permitted?
+ 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
@@ -77,7 +77,7 @@ class ParametersPermitTest < ActiveSupport::TestCase
ActionController::Parameters.permit_all_parameters = false
end
end
-
+
test "permitting parameters as an array" do
assert_equal "32", @params[:person].permit([ :age ])[:age]
end

0 comments on commit 5b3b9b0

Please sign in to comment.