diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/connection_adapters/type/type_map_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_adapters/type/type_map_test.rb b/activerecord/test/cases/connection_adapters/type/type_map_test.rb index 3abd7a276e..e85bbc8dc7 100644 --- a/activerecord/test/cases/connection_adapters/type/type_map_test.rb +++ b/activerecord/test/cases/connection_adapters/type/type_map_test.rb @@ -125,6 +125,16 @@ module ActiveRecord assert_equal mapping.lookup(3), 'string' assert_kind_of Type::Value, mapping.lookup(4) end + + def test_clear_mappings + time = Time.new + mapping = TypeMap.new + + mapping.register_type(/time/i, time) + mapping.clear + + assert_not_equal mapping.lookup('time'), time + end end end end |