diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-08 12:40:28 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-08-08 12:40:28 -0700 |
commit | 11fbeb71d9bd07bb3bdb72520b8ba7f74dc7dffb (patch) | |
tree | 9cd6bcb23fe6e9cd70bf83556de0546d4b42bae0 /activerecord/test/cases/adapter_test.rb | |
parent | 8360d7196515ba66fe5d535f6dbeeea5394e966a (diff) | |
parent | 58af0d46cfa4481800bb1c4c26950c717ea1ebdd (diff) | |
download | rails-11fbeb71d9bd07bb3bdb72520b8ba7f74dc7dffb.tar.gz rails-11fbeb71d9bd07bb3bdb72520b8ba7f74dc7dffb.tar.bz2 rails-11fbeb71d9bd07bb3bdb72520b8ba7f74dc7dffb.zip |
Merge pull request #2466 from rsim/fix_test_disable_referential_integrity
Fixed test_disable_referential_integrity on Oracle
Diffstat (limited to 'activerecord/test/cases/adapter_test.rb')
-rw-r--r-- | activerecord/test/cases/adapter_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapter_test.rb b/activerecord/test/cases/adapter_test.rb index 3942e7bb41..f1023ed7ef 100644 --- a/activerecord/test/cases/adapter_test.rb +++ b/activerecord/test/cases/adapter_test.rb @@ -151,6 +151,9 @@ class AdapterTest < ActiveRecord::TestCase else @connection.execute "INSERT INTO fk_test_has_fk (fk_id) VALUES (0)" end + # should deleted created record as otherwise disable_referential_integrity will try to enable contraints after executed block + # and will fail (at least on Oracle) + @connection.execute "DELETE FROM fk_test_has_fk" end end end |