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:
parent
1663bab3a9
commit
445696c0ca
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue