aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2014-07-05 13:24:24 -0700
committerGodfrey Chan <godfreykfc@gmail.com>2014-07-05 13:57:16 -0700
commitc031016558d7be757c9216186670bf3418a1a6ae (patch)
treead2b709b6dafa9dcdb7ec238feaaabad582681aa /activerecord/test/cases
parent6787507883972bc3acb83c105fb753a8ca69fd1e (diff)
downloadrails-c031016558d7be757c9216186670bf3418a1a6ae.tar.gz
rails-c031016558d7be757c9216186670bf3418a1a6ae.tar.bz2
rails-c031016558d7be757c9216186670bf3418a1a6ae.zip
Fix mysql/mysql2 failing with FK constraint errors
One of the author fixture we have ("david") references an author address by ID. Since we disable FK checks when inserting fixtures, this is all fine until we try to update it, at which point MySQL would complain about the missing row referenced by the `author_address_id`. [Godfrey Chan, Matthew Draper]
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/persistence_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/persistence_test.rb b/activerecord/test/cases/persistence_test.rb
index 9b762fc0d5..2170fe6118 100644
--- a/activerecord/test/cases/persistence_test.rb
+++ b/activerecord/test/cases/persistence_test.rb
@@ -20,7 +20,7 @@ require 'models/toy'
require 'rexml/document'
class PersistenceTest < ActiveRecord::TestCase
- fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :categorizations, :categories, :posts, :minivans, :pets, :toys
+ fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :author_addresses, :categorizations, :categories, :posts, :minivans, :pets, :toys
# Oracle UPDATE does not support ORDER BY
unless current_adapter?(:OracleAdapter)