Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tvOS 16 Beta 2 Unable to override the Stub that has same url #523

Open
rupikasompalli opened this issue Jul 7, 2022 · 0 comments
Open

Comments

@rupikasompalli
Copy link

In my project, I use Swifter version 1.5.0 to stub the json responses.

The following code worked find prior to tvOS 16, but broke in tvOS 16

    ```
    let responseFail: ((HttpRequest) -> HttpResponse) = { [weak self] request in
        return .fileResponse("fail_json")
    }
   server.POST[stub.url] = responseFail

      // Some code for tests, and now stub the same url with different response

     let responseSuccess: ((HttpRequest) -> HttpResponse) = { [weak self] request in
        return .fileResponse("success_json")
    }
    server.POST[stub.url] = responseSuccess

    // verify result
In tvOS16 I still get responseFail where I expect responseSuccess.

In tvOS15 and earlier, I get responseSuccess as expected in my last line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant