1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Drop a temporary table before end of a test case

This commit is contained in:
yui-knk 2016-08-14 00:44:24 +09:00
parent 1663bab3a9
commit 445696c0ca

View file

@ -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