Skip to content

Matcher doesn't match partly URLs #96

Description

@Buju77

It seems current version (2.0.1) of matcher doesn't match uri path partly.

Example:

func testPartlyPathMatches() {
    let request = URLRequest(url: URL(string: "https://api.palaverapp.com/some/other/v42/auth/login")!)
    XCTAssertTrue(uri("/auth/login")(request))
}

This test will fail. It seems I always need to specify everything after the host in the uri matcher. This is a bit inconvenient.

Because eg. I as mobile app developer don't want to care how the backend has structured the login endpoint in my tests or which endpoint version it is. I'm only interested in stubbing the login request.

Or did I miss something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions