diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-11-01 17:28:05 -0700 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-11-01 17:28:05 -0700 |
commit | c2b5a8e61ba0f35015e6ac949a5c8fce2042a1f2 (patch) | |
tree | e8ac76013d192271e786d749229799a84c74249e /actionpack/test/dispatch | |
parent | 1918b12c0429caec2a6134ac5e5b42ade103fe90 (diff) | |
parent | b3f894c5282244b41221f98dfac5296cea5a4485 (diff) | |
download | rails-c2b5a8e61ba0f35015e6ac949a5c8fce2042a1f2.tar.gz rails-c2b5a8e61ba0f35015e6ac949a5c8fce2042a1f2.tar.bz2 rails-c2b5a8e61ba0f35015e6ac949a5c8fce2042a1f2.zip |
Merge pull request #9660 from sebasoga/change_strong_parameters_require_behaviour
Change ActionController::Parameters#require behavior when value is empty
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/debug_exceptions_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/debug_exceptions_test.rb b/actionpack/test/dispatch/debug_exceptions_test.rb index 3045a07ad6..6e28e4a982 100644 --- a/actionpack/test/dispatch/debug_exceptions_test.rb +++ b/actionpack/test/dispatch/debug_exceptions_test.rb @@ -43,6 +43,8 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest raise ActionController::UrlGenerationError, "No route matches" when "/parameter_missing" raise ActionController::ParameterMissing, :missing_param_key + when "/required_key_empty_value" + raise ActionController::EmptyParameter, :empty_param_key else raise "puke!" end @@ -126,6 +128,10 @@ class DebugExceptionsTest < ActionDispatch::IntegrationTest get "/parameter_missing", {}, {'action_dispatch.show_exceptions' => true} assert_response 400 assert_match(/ActionController::ParameterMissing/, body) + + get "/required_key_empty_value", {}, {'action_dispatch.show_exceptions' => true} + assert_response 400 + assert_match(/ActionController::EmptyParameter/, body) end test "rescue with text error for xhr request" do |