Skip to content

Matcher doesn't match partly URLs #96

@Buju77

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions