diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-10-26 21:10:40 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-26 21:31:37 -0700 |
commit | 2bdd8fa86313a48de11d95fc48f97ada24d7d8af (patch) | |
tree | 204b95478f39f29db3e34de3887b3742511f33da /actionpack/test | |
parent | 000d5936216f363a5b11013f664959019b7ebac2 (diff) | |
download | rails-2bdd8fa86313a48de11d95fc48f97ada24d7d8af.tar.gz rails-2bdd8fa86313a48de11d95fc48f97ada24d7d8af.tar.bz2 rails-2bdd8fa86313a48de11d95fc48f97ada24d7d8af.zip |
Clean up parameter logging some
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/filter_params_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/controller/filter_params_test.rb b/actionpack/test/controller/filter_params_test.rb index 19232c6bc9..43bef34885 100644 --- a/actionpack/test/controller/filter_params_test.rb +++ b/actionpack/test/controller/filter_params_test.rb @@ -19,23 +19,23 @@ class FilterParamTest < ActionController::TestCase def method_missing(method, *args) @logged ||= [] - @logged << args.first + @logged << args.first unless block_given? + @logged << yield if block_given? end end setup :set_logger + def test_filter_parameters_must_have_one_word + assert_raises RuntimeError do + FilterParamController.filter_parameter_logging + end + end + def test_filter_parameters assert FilterParamController.respond_to?(:filter_parameter_logging) - assert !@controller.respond_to?(:filter_parameters) - - FilterParamController.filter_parameter_logging - assert @controller.respond_to?(:filter_parameters) - test_hashes = [[{},{},[]], - [{'foo'=>nil},{'foo'=>nil},[]], - [{'foo'=>'bar'},{'foo'=>'bar'},[]], - [{'foo'=>1},{'foo'=>1},[]], + test_hashes = [ [{'foo'=>'bar'},{'foo'=>'bar'},%w'food'], [{'foo'=>'bar'},{'foo'=>'[FILTERED]'},%w'foo'], [{'foo'=>'bar', 'bar'=>'foo'},{'foo'=>'[FILTERED]', 'bar'=>'foo'},%w'foo baz'], |