spec/unit/request_pattern_spec.rb in webmock-3.4.1 vs spec/unit/request_pattern_spec.rb in webmock-3.4.2

- old
+ new

@@ -119,9 +119,15 @@ it "should match if uri Addressable::Template pattern matches request uri" do expect(WebMock::RequestPattern.new(:get, Addressable::Template.new("www.example.com"))). to match(WebMock::RequestSignature.new(:get, "www.example.com")) end + it "should match if Addressable::Template pattern that has ip address host matches request uri" do + signature = WebMock::RequestSignature.new(:get, "127.0.0.1:3000/1234") + uri = Addressable::Template.new("127.0.0.1:3000/{id}") + expect(WebMock::RequestPattern.new(:get, uri)).to match(signature) + end + it "should match for uris with same parameters as pattern" do expect(WebMock::RequestPattern.new(:get, "www.example.com?a=1&b=2")). to match(WebMock::RequestSignature.new(:get, "www.example.com?a=1&b=2")) end