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:
parent
0fc115724b
commit
46d0bbdbde
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue