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

Use equality checks rather than contains in validation tests #191

Merged
merged 2 commits into from
May 3, 2024

Conversation

acsauk
Copy link
Contributor

@acsauk acsauk commented May 3, 2024

As we relied on assert.Contains() in our validation tests could add and remove validations not explicitly tested for in tests and have them pass. Being more specific in our assertions using assert.Equals() and assert.ElementsMatch() should give us more confidence in our unit tests when making changes to validation.

@acsauk acsauk marked this pull request as ready for review May 3, 2024 14:16
@acsauk acsauk requested a review from a team as a code owner May 3, 2024 14:16
@acsauk acsauk merged commit 6180238 into main May 3, 2024
23 checks passed
@acsauk acsauk deleted the prefer-equals branch May 3, 2024 14:50
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.

3 participants