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

Fix tests code to prevent some runtime errors #2381

Merged
merged 2 commits into from
Aug 28, 2017

Conversation

Morlinest
Copy link
Member

Trying to improve tests code as in #2376.

Copy link
Member

@ethantkoenig ethantkoenig left a comment

Choose a reason for hiding this comment

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

One minor suggestion

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) {
Copy link
Member

@ethantkoenig ethantkoenig Aug 26, 2017

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) {
...
}

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right

@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Aug 26, 2017
@appleboy appleboy added the type/enhancement An improvement of existing functionality label Aug 26, 2017
@appleboy appleboy added this to the 1.3.0 milestone Aug 26, 2017
@appleboy
Copy link
Member

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 26, 2017
@lafriks
Copy link
Member

lafriks commented Aug 28, 2017

Make LG-TM work

@lafriks lafriks merged commit 8e61823 into go-gitea:master Aug 28, 2017
@Morlinest Morlinest deleted the fix/tests-runtime-errors branch August 30, 2017 08:35
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants