diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2014-01-23 19:33:59 -0800 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2014-01-23 19:33:59 -0800 |
commit | f1a0b15139a955cf67bc2fd2909840b32ce73485 (patch) | |
tree | ef2fa35d2b5d929d55cb89a071400a99bbf21cef /actionpack/test | |
parent | bc0820c495dacaf869a9cfb35ca7ef0e113e5573 (diff) | |
parent | aae53d2175b306bf9e085a86d9e5d8a194fcf63b (diff) | |
download | rails-f1a0b15139a955cf67bc2fd2909840b32ce73485.tar.gz rails-f1a0b15139a955cf67bc2fd2909840b32ce73485.tar.bz2 rails-f1a0b15139a955cf67bc2fd2909840b32ce73485.zip |
Merge pull request #13819 from arthurnn/one_require_test
unify param.require tests
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/parameters/parameters_require_test.rb | 10 | ||||
-rw-r--r-- | actionpack/test/controller/required_params_test.rb | 8 |
2 files changed, 8 insertions, 10 deletions
diff --git a/actionpack/test/controller/parameters/parameters_require_test.rb b/actionpack/test/controller/parameters/parameters_require_test.rb deleted file mode 100644 index bdaba8d2d8..0000000000 --- a/actionpack/test/controller/parameters/parameters_require_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'abstract_unit' -require 'action_controller/metal/strong_parameters' - -class ParametersRequireTest < ActiveSupport::TestCase - test "required parameters must be present not merely not nil" do - assert_raises(ActionController::ParameterMissing) do - ActionController::Parameters.new(person: {}).require(:person) - end - end -end diff --git a/actionpack/test/controller/required_params_test.rb b/actionpack/test/controller/required_params_test.rb index 343d57c300..25d0337212 100644 --- a/actionpack/test/controller/required_params_test.rb +++ b/actionpack/test/controller/required_params_test.rb @@ -25,3 +25,11 @@ class ActionControllerRequiredParamsTest < ActionController::TestCase assert_response :ok end end + +class ParametersRequireTest < ActiveSupport::TestCase + test "required parameters must be present not merely not nil" do + assert_raises(ActionController::ParameterMissing) do + ActionController::Parameters.new(person: {}).require(:person) + end + end +end |