Skip to content

WebMock::Util::JSON.parse fails for binary strings. #260

Closed
wants to merge 1 commit into from
+5 −1
View
6 spec/unit/util/json_spec.rb
@@ -4,4 +4,8 @@
it "should parse json without parsing dates" do
WebMock::Util::JSON.parse("\"a\":\"2011-01-01\"").should == {"a" => "2011-01-01"}
end
-end
+
+ it "should parse json that includes binary strings" do
+ WebMock::Util::JSON.parse("{\"a\":\"\\u0000\\u0001\\u0002\"}").should == {"a" => "\x00\x01\x02"}
+ end
+end
Something went wrong with that request. Please try again.