diff options
author | Arthur Neves <arthurnn@gmail.com> | 2014-01-23 22:28:24 -0500 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2014-01-23 22:28:24 -0500 |
commit | aae53d2175b306bf9e085a86d9e5d8a194fcf63b (patch) | |
tree | 4598f8ecc77e24353eb1c9ae038c4d1e9e7579cf /actionpack/test/controller | |
parent | a7680ab47ddaf3f963824a72a130e2b18fbd1195 (diff) | |
download | rails-aae53d2175b306bf9e085a86d9e5d8a194fcf63b.tar.gz rails-aae53d2175b306bf9e085a86d9e5d8a194fcf63b.tar.bz2 rails-aae53d2175b306bf9e085a86d9e5d8a194fcf63b.zip |
unify param.require tests
Diffstat (limited to 'actionpack/test/controller')
-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 |