Browse files

Merge pull request #2466 from rsim/fix_test_disable_referential_integ…

…rity

Fixed test_disable_referential_integrity on Oracle
  • Loading branch information...
2 parents 8360d71 + 58af0d4 commit 11fbeb71d9bd07bb3bdb72520b8ba7f74dc7dffb @tenderlove tenderlove committed Aug 8, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 activerecord/test/cases/adapter_test.rb
View
3 activerecord/test/cases/adapter_test.rb
@@ -151,6 +151,9 @@ def test_disable_referential_integrity
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

0 comments on commit 11fbeb7

Please sign in to comment.