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

feat: add the possibility to check if the body matches many expected strings #21

Merged
merged 2 commits into from
May 7, 2019

Conversation

tkanos
Copy link
Contributor

@tkanos tkanos commented May 7, 2019

A new array field response_contains, can contains many string to check

To stay retro compatible with response_body_contains, we add the response_body_contains to the response_contains array.

I don't really like what the function to ensure the retro compatibility prepareResponseBody
Do you think we can add it elsewhere ?

…strings

A new array field response_contains, can contains many string to check
To stay retro compatible with response_body_contains, we add the response_body_contains to the response_contains array.
tester/tester.go Outdated
@@ -39,9 +39,11 @@ type Contract struct {

ExpectedHTTPCode int `json:"http_code_is" yaml:"http_code_is"`
ExpectedResponseBody string `json:"response_body_contains" yaml:"response_body_contains"`
ExpectedResponse []string `json:"response_contains" yaml:"response_contains"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps the plural ExpectedResponses would be better since this is a slice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@colindickson colindickson merged commit 2b95e6c into bluehoodie:master May 7, 2019
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

Successfully merging this pull request may close these issues.

2 participants