Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: HaveHTTPStatus multiple expected values
Sometimes more than one HTTP status is acceptable. For example a server may (correctly) return HTTP 204 for an empty response, or it might return HTTP 200 for an empty response - and we might want to accept either. We can now write: ```go Expect(resp).To(HaveHTTPStatus(http.StatusOK, http.StatusNoContent)) ``` And it will match either. This is simpler than using Or() or SatisfyAny().
- Loading branch information
Showing
3 changed files
with
136 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters