mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Avoid hardcoded value in test setup/teardown.
This commit is contained in:
parent
bb8b214184
commit
6a75e2ce10
1 changed files with 2 additions and 1 deletions
|
@ -105,6 +105,7 @@ class QueryStringParsingTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
|
||||
test "perform_deep_munge" do
|
||||
old_perform_deep_munge = ActionDispatch::Request::Utils.perform_deep_munge
|
||||
ActionDispatch::Request::Utils.perform_deep_munge = false
|
||||
begin
|
||||
assert_parses({"action" => nil}, "action")
|
||||
|
@ -115,7 +116,7 @@ class QueryStringParsingTest < ActionDispatch::IntegrationTest
|
|||
assert_parses({"action" => {"foo" => [{"bar" => nil}]}}, "action[foo][][bar]")
|
||||
assert_parses({"action" => ['1',nil]}, "action[]=1&action[]")
|
||||
ensure
|
||||
ActionDispatch::Request::Utils.perform_deep_munge = true
|
||||
ActionDispatch::Request::Utils.perform_deep_munge = old_perform_deep_munge
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue