1
0
Fork 0
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:
Zuhao Wan 2014-06-05 20:12:44 +08:00
parent bb8b214184
commit 6a75e2ce10

View file

@ -105,6 +105,7 @@ class QueryStringParsingTest < ActionDispatch::IntegrationTest
end end
test "perform_deep_munge" do test "perform_deep_munge" do
old_perform_deep_munge = ActionDispatch::Request::Utils.perform_deep_munge
ActionDispatch::Request::Utils.perform_deep_munge = false ActionDispatch::Request::Utils.perform_deep_munge = false
begin begin
assert_parses({"action" => nil}, "action") 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" => {"foo" => [{"bar" => nil}]}}, "action[foo][][bar]")
assert_parses({"action" => ['1',nil]}, "action[]=1&action[]") assert_parses({"action" => ['1',nil]}, "action[]=1&action[]")
ensure ensure
ActionDispatch::Request::Utils.perform_deep_munge = true ActionDispatch::Request::Utils.perform_deep_munge = old_perform_deep_munge
end end
end end