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

Different responses for the same endpoint #97

Closed
xneomac opened this issue Jan 13, 2020 · 1 comment
Closed

Different responses for the same endpoint #97

xneomac opened this issue Jan 13, 2020 · 1 comment

Comments

@xneomac
Copy link
Contributor

xneomac commented Jan 13, 2020

I would like to write theses mocks and I would like the first response to be a 200 and the next 4 to be 404.

let mock_ok = mock("GET", "/next")
    .with_status(200)
    .create();

let mock_bad = mock("GET", "/next")
    .with_status(404)
    .expect(4)
    .create();

mock_ok.assert();
mock_bad.assert();

Is it already possible? Can it be an interesting feature?

@lipanski
Copy link
Owner

lipanski commented Apr 5, 2020

Released in 0.25.0.

@lipanski lipanski closed this as completed Apr 5, 2020
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

2 participants