-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Use Testify assertions in tests #2794
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, and thank you, but: I believe that testify's Equal wants the expected value to be first. So, all order of arguments should be reversed. Think you could do that? Thanks
Sorry about that, should be ok now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great; thank you!
I've also pushed a change to use testify's error-matching assertions wherever possible. The logic of the tests stays the same, but the failure messages and the readability of tests will be improved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(GitHub is having a hiccup, so re-approving)
Thank you so much, @cristiand391!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cristiand391:use-testify-assertion
Ref: #2750 (comment)
Replace
eq
assertion helper with Testify'sassert.Equal
.