1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add test validating that Model.attribute_names cache is busted

This commit is contained in:
James Coleman 2016-10-04 15:22:27 -04:00
parent 0fc115724b
commit 46d0bbdbde

View file

@ -106,12 +106,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