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"
|
require "active_record"
|
||||||
|
|
||||||
class JsonParamsParsingTest < ActionDispatch::IntegrationTest
|
class JsonParamsParsingTest < ActionDispatch::IntegrationTest
|
||||||
test "prevent null query" do
|
def test_prevent_null_query
|
||||||
# Make sure we have data to find
|
# Make sure we have data to find
|
||||||
klass = Class.new(ActiveRecord::Base) do
|
klass = Class.new(ActiveRecord::Base) do
|
||||||
def self.name; 'Foo'; end
|
def self.name; 'Foo'; end
|
||||||
|
@ -32,6 +32,8 @@ class JsonParamsParsingTest < ActionDispatch::IntegrationTest
|
||||||
[[[nil]], [[[nil]]]].each do |data|
|
[[[nil]], [[[nil]]]].each do |data|
|
||||||
assert_nil app.call(make_env({ 't' => data }))
|
assert_nil app.call(make_env({ 't' => data }))
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
|
klass.connection.drop_table("foos")
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue