diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-01-03 15:03:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-03 15:03:06 +0100 |
commit | 6f0cda8f8e208143cbd3b39e786521c2e5cddb7a (patch) | |
tree | 1156f9d508d8608c348a0c0b2ec12bb14c93c462 /activerecord/test | |
parent | 2584762cd9876780929098ad847ccf53aa45c10e (diff) | |
parent | 0007501669879a8560090897f78cf1d1b69bf30d (diff) | |
download | rails-6f0cda8f8e208143cbd3b39e786521c2e5cddb7a.tar.gz rails-6f0cda8f8e208143cbd3b39e786521c2e5cddb7a.tar.bz2 rails-6f0cda8f8e208143cbd3b39e786521c2e5cddb7a.zip |
Merge pull request #33985 from eugeneius/attribute_methods_schema_cache
Only define attribute methods from schema cache
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/connection_adapters/schema_cache_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_adapters/schema_cache_test.rb b/activerecord/test/cases/connection_adapters/schema_cache_test.rb index 67496381d1..727cab77f5 100644 --- a/activerecord/test/cases/connection_adapters/schema_cache_test.rb +++ b/activerecord/test/cases/connection_adapters/schema_cache_test.rb @@ -91,6 +91,22 @@ module ActiveRecord @cache.clear_data_source_cache!("posts") end + test "#columns_hash? is populated by #columns_hash" do + assert_not @cache.columns_hash?("posts") + + @cache.columns_hash("posts") + + assert @cache.columns_hash?("posts") + end + + test "#columns_hash? is not populated by #data_source_exists?" do + assert_not @cache.columns_hash?("posts") + + @cache.data_source_exists?("posts") + + assert_not @cache.columns_hash?("posts") + end + private def schema_dump_path |