spec/unit/braintree/xml/parser_spec.rb in braintree-2.22.0 vs spec/unit/braintree/xml/parser_spec.rb in braintree-2.23.0

- old
+ new

@@ -34,9 +34,18 @@ </root> END xml.should parse_to(:root => {:created_at => Time.utc(2009, 10, 28, 10, 19, 49)}) end + it "doesn't typecast dates" do + xml = <<-END + <root> + <created-at type="date">2009-10-28</created-at> + </root> + END + xml.should parse_to(:root => {:created_at => "2009-10-28"}) + end + it "builds an array if type=array" do xml = <<-END <root> <customers type="array"> <customer><name>Adam</name></customer>