diff options
author | Xavier Noria <fxn@hashref.com> | 2015-03-28 10:01:25 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2015-03-28 10:01:25 +0100 |
commit | 8798788c65b0603caf4b55fe7e961e99f2ea4bde (patch) | |
tree | effbc275fc723a581b69cd1aec35ceb9d950277d /actionpack/test | |
parent | 8bf2825205ad392c923070e722fc8d39687520e3 (diff) | |
parent | 1b0526eaac87342b5413183e082b51b10a6ace6e (diff) | |
download | rails-8798788c65b0603caf4b55fe7e961e99f2ea4bde.tar.gz rails-8798788c65b0603caf4b55fe7e961e99f2ea4bde.tar.bz2 rails-8798788c65b0603caf4b55fe7e961e99f2ea4bde.zip |
Merge pull request #19544 from shuhei/fix-parameters-const-missing
Return super in ActionController::Parameters.const_missing
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/parameters/always_permitted_parameters_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/test/controller/parameters/always_permitted_parameters_test.rb b/actionpack/test/controller/parameters/always_permitted_parameters_test.rb index 059f310d49..59be08db54 100644 --- a/actionpack/test/controller/parameters/always_permitted_parameters_test.rb +++ b/actionpack/test/controller/parameters/always_permitted_parameters_test.rb @@ -1,5 +1,6 @@ require 'abstract_unit' require 'action_controller/metal/strong_parameters' +require 'minitest/mock' class AlwaysPermittedParametersTest < ActiveSupport::TestCase def setup @@ -14,7 +15,13 @@ class AlwaysPermittedParametersTest < ActiveSupport::TestCase test "shows deprecations warning on NEVER_UNPERMITTED_PARAMS" do assert_deprecated do - ActionController::Parameters::NEVER_UNPERMITTED_PARAMS + ActionController::Parameters::NEVER_UNPERMITTED_PARAMS + end + end + + test "returns super on missing constant other than NEVER_UNPERMITTED_PARAMS" do + ActionController::Parameters.superclass.stub :const_missing, "super" do + assert_equal "super", ActionController::Parameters::NON_EXISTING_CONSTANT end end |