aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/migration_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/migration_test.rb')
-rw-r--r--activerecord/test/migration_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb
index 3b74604c44..f2683f3aef 100644
--- a/activerecord/test/migration_test.rb
+++ b/activerecord/test/migration_test.rb
@@ -925,6 +925,14 @@ if ActiveRecord::Base.connection.supports_migrations?
end
end
+ def test_references_column_type_with_polymorphic_and_options_null_is_false_adds_table_flag
+ with_new_table do |t|
+ t.expects(:column).with('taggable_type', :string, {:null => false})
+ t.expects(:column).with('taggable_id', :integer, {:null => false})
+ t.references :taggable, :polymorphic => true, :null => false
+ end
+ end
+
def test_belongs_to_works_like_references
with_new_table do |t|
t.expects(:column).with('customer_id', :integer, {})