Permalink
Browse files

Add test case for clear mappings

  • Loading branch information...
1 parent babcd7d commit fccb7523008daca92eaec0100742b0a023ce5cbb Akshay Vishnoi committed May 27, 2014
Showing with 10 additions and 0 deletions.
  1. +10 −0 activerecord/test/cases/connection_adapters/type/type_map_test.rb
@@ -125,6 +125,16 @@ def test_lookup_non_strings
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

0 comments on commit fccb752

Please sign in to comment.