From fdac932707fb16b7d074b1d0bc7c255157d72675 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 10 Mar 2019 01:53:48 +0900 Subject: Extract `truncate` and `truncate_tables` into database statements This is to easier make `truncate_tables` to bulk statements. --- activerecord/test/cases/adapters/postgresql/connection_test.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'activerecord/test/cases/adapters/postgresql/connection_test.rb') diff --git a/activerecord/test/cases/adapters/postgresql/connection_test.rb b/activerecord/test/cases/adapters/postgresql/connection_test.rb index 40ab158c05..210758f462 100644 --- a/activerecord/test/cases/adapters/postgresql/connection_test.rb +++ b/activerecord/test/cases/adapters/postgresql/connection_test.rb @@ -25,14 +25,6 @@ module ActiveRecord super end - def test_truncate - count = ActiveRecord::Base.connection.execute("select count(*) from comments").first["count"].to_i - assert_operator count, :>, 0 - ActiveRecord::Base.connection.truncate("comments") - count = ActiveRecord::Base.connection.execute("select count(*) from comments").first["count"].to_i - assert_equal 0, count - end - def test_encoding assert_queries(1) do assert_not_nil @connection.encoding -- cgit v1.2.3