Permalink
Browse files

Merge pull request #180 from edelpero/fixes_test_for_old_ruby_version

Updates test to work with ruby 1.8.7
  • Loading branch information...
2 parents a434fb1 + bf2766d commit 78f4518d4dd1532043ef6d1e73e56356efcb5f80 @rafaelfranca rafaelfranca committed Dec 1, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/parameters_permit_test.rb
@@ -96,9 +96,9 @@ def assert_filtered_out(params, key)
end
test 'do not break params filtering on nil values' do
- params = ActionController::Parameters.new(a: 1, b: [1, 2, 3], c: nil)
+ params = ActionController::Parameters.new(:a => 1, :b => [1, 2, 3], :c => nil)
- permitted = params.permit(:a, c: [], b: [])
+ permitted = params.permit(:a, :c => [], :b => [])
assert_equal 1, permitted[:a]
assert_equal [1, 2, 3], permitted[:b]
assert_equal nil, permitted[:c]
@@ -321,8 +321,8 @@ def assert_filtered_out(params, key)
test "nested number as key" do
params = ActionController::Parameters.new({
- product: {
- properties: {
+ :product => {
+ :properties => {
'0' => "prop0",
'1' => "prop1"
}

0 comments on commit 78f4518

Please sign in to comment.