aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-09-17 11:43:42 +0200
committerYves Senn <yves.senn@gmail.com>2014-09-17 11:43:42 +0200
commit38b5e191f6ceb71fe9981f3e18455ef76ada3331 (patch)
tree4255d400fa5ff3fa1ddd4cf220da23683761e10d /activerecord/test/cases
parent6d8221323f409b990876f98df73d1f744bf8cd71 (diff)
downloadrails-38b5e191f6ceb71fe9981f3e18455ef76ada3331.tar.gz
rails-38b5e191f6ceb71fe9981f3e18455ef76ada3331.tar.bz2
rails-38b5e191f6ceb71fe9981f3e18455ef76ada3331.zip
do not dump foreign keys for ignored tables.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/schema_dumper_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb
index d7ee56374d..93fb502410 100644
--- a/activerecord/test/cases/schema_dumper_test.rb
+++ b/activerecord/test/cases/schema_dumper_test.rb
@@ -371,6 +371,11 @@ class SchemaDumperTest < ActiveRecord::TestCase
output = standard_dump
assert_match(/^\s+add_foreign_key "fk_test_has_fk"[^\n]+\n\s+add_foreign_key "lessons_students"/, output)
end
+
+ def test_do_not_dump_foreign_keys_for_ignored_tables
+ output = dump_table_schema "authors"
+ assert_equal ["authors"], output.scan(/^\s*add_foreign_key "([^"]+)".+$/).flatten
+ end
end
class CreateDogMigration < ActiveRecord::Migration