Skip to content

Or() and And() don't work correctly #145

@Moon1706

Description

@Moon1706

Hey! Today I've tried to make Matcher using Or:

httpmock.BodyContainsString(`"subject":"incorrect"`).Or(httpmock.BodyContainsString(`"scenario":"incorrect"`))

and figured out that in 100% of cases, the first matcher was working correctly, but the second one, which was called in Or() function, was ignored. I suppose there is an issue in this line: https://github.com/jarcoal/httpmock/blob/v1/match.go#L246 . Could you check, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions