From 445696c0ca1b5fea1066677e0a9cb13ad0fe30e1 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sun, 14 Aug 2016 00:44:24 +0900 Subject: [PATCH] Drop a temporary table before end of a test case --- railties/test/json_params_parsing_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/railties/test/json_params_parsing_test.rb b/railties/test/json_params_parsing_test.rb index eac731a942..104664c1ee 100644 --- a/railties/test/json_params_parsing_test.rb +++ b/railties/test/json_params_parsing_test.rb @@ -3,7 +3,7 @@ require "action_dispatch" require "active_record" class JsonParamsParsingTest < ActionDispatch::IntegrationTest - test "prevent null query" do + def test_prevent_null_query # Make sure we have data to find klass = Class.new(ActiveRecord::Base) do def self.name; 'Foo'; end @@ -32,6 +32,8 @@ class JsonParamsParsingTest < ActionDispatch::IntegrationTest [[[nil]], [[[nil]]]].each do |data| assert_nil app.call(make_env({ 't' => data })) end + ensure + klass.connection.drop_table("foos") end private