diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-16 13:07:10 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-16 13:52:07 +0000 |
commit | 7f20bb995aa34c6c6869543209595ff811e9dbc3 (patch) | |
tree | 1ba6255c6dd0f6326d0535497b111dcdbfbf49d3 /activerecord/test | |
parent | dee94d8ab5b7d27653052441a3b408db380dd784 (diff) | |
download | rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.tar.gz rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.tar.bz2 rails-7f20bb995aa34c6c6869543209595ff811e9dbc3.zip |
Don't store defaults in the schema cache
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 1 | ||||
-rw-r--r-- | activerecord/test/cases/connection_adapters/schema_cache_test.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index a034dd7e3a..dd0aeada51 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1494,6 +1494,7 @@ class BasicsTest < ActiveRecord::TestCase def test_original_primary_key k = Class.new(ActiveRecord::Base) def k.name; "Foo"; end + k.table_name = "posts" k.primary_key = "bar" assert_deprecated do diff --git a/activerecord/test/cases/connection_adapters/schema_cache_test.rb b/activerecord/test/cases/connection_adapters/schema_cache_test.rb index d5ae08cd58..cd98bf90cf 100644 --- a/activerecord/test/cases/connection_adapters/schema_cache_test.rb +++ b/activerecord/test/cases/connection_adapters/schema_cache_test.rb @@ -13,7 +13,7 @@ module ActiveRecord end def test_primary_key_for_non_existent_table - assert_equal 'id', @cache.primary_keys['omgponies'] + assert_nil @cache.primary_keys['omgponies'] end def test_caches_columns |