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

Having equivalent ensure! methods #26

Open
cbonaudo opened this issue Jun 16, 2022 · 0 comments
Open

Having equivalent ensure! methods #26

cbonaudo opened this issue Jun 16, 2022 · 0 comments

Comments

@cbonaudo
Copy link
Member

cbonaudo commented Jun 16, 2022

Using assert_body_matches, and expect_status are used to panic during the tests.

I think that having an equivalent with ensure!-like functionnality could be a nice possibility if that's what we want to use in our tests.

  • ensure_body_matches, that returns a Result if body do not match
  • ensure_status, that returns a Result if the status do not match

!!! - It could make sense to split the expect_status and the json() of the response before implementing this so "ensure_status" doesn't need to json() the response too.

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