diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-18 14:04:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-18 14:04:47 +0900 |
commit | 58c1dda4a21291d0d0d51342e275dd02228022f0 (patch) | |
tree | 3e2b91d56fb4791988b1d094ef816e37ddc2099f /activerecord/test/cases/attributes_test.rb | |
parent | 8cde75813d54b92a894fb47d296929e8a6d26ba1 (diff) | |
parent | 46d0bbdbdeedc1001922858f49d1caa9785e0345 (diff) | |
download | rails-58c1dda4a21291d0d0d51342e275dd02228022f0.tar.gz rails-58c1dda4a21291d0d0d51342e275dd02228022f0.tar.bz2 rails-58c1dda4a21291d0d0d51342e275dd02228022f0.zip |
Merge pull request #26707 from jcoleman/add_attribute_names_cache_busting_spec
Add test validating that Model.attribute_names cache is busted
Diffstat (limited to 'activerecord/test/cases/attributes_test.rb')
-rw-r--r-- | activerecord/test/cases/attributes_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/attributes_test.rb b/activerecord/test/cases/attributes_test.rb index 29a25b4461..2caf2a63d4 100644 --- a/activerecord/test/cases/attributes_test.rb +++ b/activerecord/test/cases/attributes_test.rb @@ -108,12 +108,14 @@ module ActiveRecord assert_equal 6, klass.attribute_types.length assert_equal 6, klass.column_defaults.length + assert_equal 6, klass.attribute_names.length assert_not klass.attribute_types.include?("wibble") klass.attribute :wibble, Type::Value.new assert_equal 7, klass.attribute_types.length assert_equal 7, klass.column_defaults.length + assert_equal 7, klass.attribute_names.length assert_includes klass.attribute_types, "wibble" end |