From 2a129380e82c81caaf02a099f01d319f0d54a7ab Mon Sep 17 00:00:00 2001 From: Fumiaki MATSUSHIMA Date: Sun, 13 Dec 2015 12:46:59 +0900 Subject: Use `SET CONSTRAINTS` for `disable_referential_integrity` without superuser privileges (take 2) Re-create https://github.com/rails/rails/pull/21233 eeac6151a5 was reverted (127509c071b4) because it breaks tests. ---------------- ref: 72c1557254 - We must use `authors` fixture with `author_addresses` because of its foreign key constraint. - Tests require PostgreSQL >= 9.4.2 because it had a bug about `ALTER CONSTRAINTS` and fixed in 9.4.2. --- activerecord/test/cases/json_serialization_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/json_serialization_test.rb') diff --git a/activerecord/test/cases/json_serialization_test.rb b/activerecord/test/cases/json_serialization_test.rb index 5a1d066aef..9b4b61b16e 100644 --- a/activerecord/test/cases/json_serialization_test.rb +++ b/activerecord/test/cases/json_serialization_test.rb @@ -168,7 +168,7 @@ class JsonSerializationTest < ActiveRecord::TestCase end class DatabaseConnectedJsonEncodingTest < ActiveRecord::TestCase - fixtures :authors, :posts, :comments, :tags, :taggings + fixtures :authors, :author_addresses, :posts, :comments, :tags, :taggings include JsonSerializationHelpers -- cgit v1.2.3