From 03097d3a6047e269641a14f4c93838598011f0b5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 18 Apr 2005 07:52:58 +0000 Subject: Fixed that fixtures were being deleted in the same order as inserts causing FK errors #890 [andrew.john.peters@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures_test.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'activerecord/test/fixtures_test.rb') diff --git a/activerecord/test/fixtures_test.rb b/activerecord/test/fixtures_test.rb index 687ce817f6..e1f2f6d24c 100755 --- a/activerecord/test/fixtures_test.rb +++ b/activerecord/test/fixtures_test.rb @@ -179,3 +179,27 @@ class OverlappingFixturesTest < Test::Unit::TestCase assert_equal([:topics, :developers, :accounts], fixture_table_names) end end + + +class ForeignKeyFixturesTest < Test::Unit::TestCase + fixtures :fk_test_has_pk, :fk_test_has_fk + + # if foreign keys are implemented and fixtures + # are not deleted in reverse order then this test + # case will raise StatementInvalid + + def test_number1 + assert true + end + + def test_number2 + assert true + end + +end + + + + + + -- cgit v1.2.3