diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-14 22:27:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-14 22:45:46 -0700 |
commit | a0dfd84440f28d2862b7eb7ea340ca28d98fb23f (patch) | |
tree | 05fa6728016f0559abdd6185ca382e193147b354 /activerecord/test | |
parent | 258f1e5980641767dd4f0a80bdade39beabbfe6c (diff) | |
download | rails-a0dfd84440f28d2862b7eb7ea340ca28d98fb23f.tar.gz rails-a0dfd84440f28d2862b7eb7ea340ca28d98fb23f.tar.bz2 rails-a0dfd84440f28d2862b7eb7ea340ca28d98fb23f.zip |
safely publish columns and columns hash info
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/connection_adapters/schema_cache_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/activerecord/test/cases/connection_adapters/schema_cache_test.rb b/activerecord/test/cases/connection_adapters/schema_cache_test.rb index 541e983758..c202659480 100644 --- a/activerecord/test/cases/connection_adapters/schema_cache_test.rb +++ b/activerecord/test/cases/connection_adapters/schema_cache_test.rb @@ -9,28 +9,28 @@ module ActiveRecord end def test_primary_key - assert_equal 'id', @cache.primary_keys['posts'] + assert_equal 'id', @cache.primary_keys('posts') end def test_primary_key_for_non_existent_table - assert_nil @cache.primary_keys['omgponies'] + assert_nil @cache.primary_keys('omgponies') end def test_caches_columns - columns = @cache.columns['posts'] - assert_equal columns, @cache.columns['posts'] + columns = @cache.columns('posts') + assert_equal columns, @cache.columns('posts') end def test_caches_columns_hash - columns_hash = @cache.columns_hash['posts'] - assert_equal columns_hash, @cache.columns_hash['posts'] + columns_hash = @cache.columns_hash('posts') + assert_equal columns_hash, @cache.columns_hash('posts') end def test_clearing @cache.columns['posts'] @cache.columns_hash['posts'] @cache.tables['posts'] - @cache.primary_keys['posts'] + @cache.primary_keys('posts') @cache.clear! @@ -44,14 +44,14 @@ module ActiveRecord @cache.columns['posts'] @cache.columns_hash['posts'] @cache.tables['posts'] - @cache.primary_keys['posts'] + @cache.primary_keys('posts') @cache = Marshal.load(Marshal.dump(@cache)) assert_equal 12, @cache.columns['posts'].size assert_equal 12, @cache.columns_hash['posts'].size assert @cache.tables['posts'] - assert_equal 'id', @cache.primary_keys['posts'] + assert_equal 'id', @cache.primary_keys('posts') end end |