-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Fix tests code to prevent some runtime errors #2381
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.
One minor suggestion
models/user_openid_test.go
Outdated
assert.False(t, oids[0].Show) | ||
assert.Equal(t, oids[1].URI, "http://user1.domain2.tld/") | ||
assert.True(t, oids[1].Show) | ||
if assert.Len(t, oids, 2) { |
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.
Maybe it'd be better to combine the two if
statements to reduce nesting
if assert.NoError(t, err) && assert.Len(t, oids, 2) {
...
}
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.
You're right
LGTM |
LGTM |
Make LG-TM work |
Trying to improve tests code as in #2376.