From 7f20bb995aa34c6c6869543209595ff811e9dbc3 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 16 Dec 2011 13:07:10 +0000 Subject: Don't store defaults in the schema cache --- activerecord/test/cases/base_test.rb | 1 + activerecord/test/cases/connection_adapters/schema_cache_test.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/test/cases') 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 -- cgit v1.2.3