-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Create unit test for AssertionContext.Request and Response #269
Labels
Comments
gavv
added
tests
Improvements or additions to tests
help wanted
Contributions are welcome
labels
Feb 2, 2023
Hey there! I can take this. |
Thanks! |
@aliziyacevik Hi, do you still have plans on the issue? |
Yes, thanks for the reply :) |
Hi @gavv, can I work on this? |
hi @gavv is the issue still there? Can i work on this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add a test to expect_test.go that verifies that:
When:
For example, if you write this code:
Then AssertionContext.Request should be set to req and AssertionContext.Response should be set to resp when req, resp, or body reports failure.
To inspect AssertionContext fields, the test should use a custom implementation of AssertionHandler. Then the test should imitate failure, and request, response, or body will invoke AssertionHandler.Failure and pass AssertionContext to it. Here is the point where the test can inspect context.
The text was updated successfully, but these errors were encountered: