You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shouldn't this work if the content_type is specified as xml? Technically if you parse that xml it would be equal.
it "should match the body pattern regardless of order for xml requests" do
@request_pattern.with(:body =>
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><subscription><first>f</first><last>l</last></subscription", :content_type => "application/xml")
@request_pattern.to_s.should ==WebMock::RequestPattern.new(:get, "www.example.com", :body =>
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><subscription><last>l</last><first>f</first></subscription", :content_type => "application/xml").to_s
end
1) WebMock::RequestPattern with should match the body pattern regardless of order for xml requests
Failure/Error: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><subscription><last>l</last><first>f</first></subscription", :content_type => "application/xml").to_s
expected: "GET http://www.example.com/ with body \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><subscription><last>l</last><first>f</first></subscription\""
got: "GET http://www.example.com/ with body \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><subscription><first>f</first><last>l</last></subscription\"" (using ==)
# ./spec/request_pattern_spec.rb:36
The text was updated successfully, but these errors were encountered:
This example is closer to the example in the readme.
it "should match the body pattern regardless of order for xml requests" do
@request_pattern.with(:body => {:subscription => {:first => "f", :last => "l"}})
@request_pattern.to_s.should ==WebMock::RequestPattern.new(:get, "www.example.com", :body =>
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><subscription><last>l</last><first>f</first></subscription", :headers => {"Content-Type" => 'application/xml'}).to_s
end
Shouldn't this work if the content_type is specified as xml? Technically if you parse that xml it would be equal.
The text was updated successfully, but these errors were encountered: