diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-05-04 00:54:04 -0700 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-05-04 23:00:41 -0700 |
commit | c5176023a0585278c533610daf1eaf6ba7d19cd8 (patch) | |
tree | 7a58fa1aa377ecbb83ef181dd9fde16a05e2f8d6 /activerecord/test/cases | |
parent | 2ec6ef5ddae7667e7bb37c0aa905848a9027da82 (diff) | |
download | rails-c5176023a0585278c533610daf1eaf6ba7d19cd8.tar.gz rails-c5176023a0585278c533610daf1eaf6ba7d19cd8.tar.bz2 rails-c5176023a0585278c533610daf1eaf6ba7d19cd8.zip |
Duplicate column_defaults properly (closes #6115)
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 35e0045e4c..c1b0cb8886 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1909,7 +1909,7 @@ class BasicsTest < ActiveRecord::TestCase end def test_attribute_names - assert_equal ["id", "type", "ruby_type", "firm_id", "firm_name", "name", "client_of", "rating", "account_id"], + assert_equal ["id", "type", "ruby_type", "firm_id", "firm_name", "name", "client_of", "rating", "account_id", "description"], Company.attribute_names end @@ -2001,6 +2001,12 @@ class BasicsTest < ActiveRecord::TestCase assert_nil hash['firm_name'] end + def test_default_values_are_deeply_dupped + company = Company.new + company.description << "foo" + assert_equal "", Company.new.description + end + ["find_by", "find_by!"].each do |meth| test "#{meth} delegates to scoped" do record = stub |