aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapter_test.rb6
-rw-r--r--activerecord/test/cases/fixtures_test.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb
index d25faf21d8..2b20d842e8 100644
--- a/activerecord/test/cases/adapter_test.rb
+++ b/activerecord/test/cases/adapter_test.rb
@@ -493,13 +493,13 @@ module ActiveRecord
end
def test_truncate_tables
+ assert_operator @connection.query_value("SELECT COUNT(*) FROM posts"), :>, 0
assert_operator @connection.query_value("SELECT COUNT(*) FROM authors"), :>, 0
assert_operator @connection.query_value("SELECT COUNT(*) FROM author_addresses"), :>, 0
- @connection.disable_referential_integrity do
- @connection.truncate_tables("author_addresses", "authors")
- end
+ @connection.truncate_tables("author_addresses", "authors", "posts")
+ assert_equal 0, @connection.query_value("SELECT COUNT(*) FROM posts")
assert_equal 0, @connection.query_value("SELECT COUNT(*) FROM authors")
assert_equal 0, @connection.query_value("SELECT COUNT(*) FROM author_addresses")
end
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index b4f28fbfd6..0c8263c9fd 100644
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -209,7 +209,7 @@ class FixturesTest < ActiveRecord::TestCase
conn = ActiveRecord::Base.connection
mysql_margin = 2
packet_size = 1024
- bytes_needed_to_have_a_1024_bytes_fixture = 858
+ bytes_needed_to_have_a_1024_bytes_fixture = 860
fixtures = {
"traffic_lights" => [
{ "location" => "US", "state" => ["NY"], "long_state" => ["a" * bytes_needed_to_have_a_1024_bytes_fixture] },