diff options
author | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2015-12-13 12:46:59 +0900 |
---|---|---|
committer | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2016-12-03 15:53:22 +0900 |
commit | e75fcdf3feaca7fac44dde23ea3059399c0ff384 (patch) | |
tree | d14355b4890d550393d07904155158fa88ac6648 /activerecord/test/cases/transactions_test.rb | |
parent | 26ea54aa7d1b0be66d5b99cab6e2f64c80fe4757 (diff) | |
download | rails-e75fcdf3feaca7fac44dde23ea3059399c0ff384.tar.gz rails-e75fcdf3feaca7fac44dde23ea3059399c0ff384.tar.bz2 rails-e75fcdf3feaca7fac44dde23ea3059399c0ff384.zip |
Use `SET CONSTRAINTS` for `disable_referential_integrity` without superuser privileges
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.
Diffstat (limited to 'activerecord/test/cases/transactions_test.rb')
-rw-r--r-- | activerecord/test/cases/transactions_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/transactions_test.rb b/activerecord/test/cases/transactions_test.rb index 9b1cca8583..30a2c48768 100644 --- a/activerecord/test/cases/transactions_test.rb +++ b/activerecord/test/cases/transactions_test.rb @@ -10,7 +10,7 @@ require "models/movie" class TransactionTest < ActiveRecord::TestCase self.use_transactional_tests = false - fixtures :topics, :developers, :authors, :posts + fixtures :topics, :developers, :authors, :author_addresses, :posts def setup @first, @second = Topic.find(1, 2).sort_by(&:id) |