-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
This is a new side effect of param_protected with rails 3.2.3:
rails new test_app
cd test_app
rake db:migrate
rails generate controller Boo indexboo_controller.rb:
class BooController < ApplicationController
def index
p params
end
endboo_controller_test.rb:
require 'test_helper'
class BooControllerTest < ActionController::TestCase
test "should get index" do
get :index, { :a => 1 }
assert_response :success
get :index, { :a => 2 }
assert_response :success
get :index, { :a => 3 }
assert_response :success
end
endHere is the test output without param_protected gem:
§ rake test:functionals
Run options:
# Running tests:
{"a"=>"1", "controller"=>"boo", "action"=>"index"}
{"a"=>"2", "controller"=>"boo", "action"=>"index"}
{"a"=>"3", "controller"=>"boo", "action"=>"index"}
.
Finished tests in 0.490426s, 2.0390 tests/s, 6.1171 assertions/s.
1 tests, 3 assertions, 0 failures, 0 errors, 0 skipsHere is the output after adding param_protected gem:
§ rake test:functionals
Run options:
# Running tests:
{"a"=>"1", "controller"=>"boo", "action"=>"index"}
{"a"=>"1", "controller"=>"boo", "action"=>"index"}
{"a"=>"1", "controller"=>"boo", "action"=>"index"}
.
Finished tests in 0.396299s, 2.5233 tests/s, 7.5700 assertions/s.
1 tests, 3 assertions, 0 failures, 0 errors, 0 skipsThis does not happen with rails 3.2.2.
Metadata
Metadata
Assignees
Labels
No labels