diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-06-07 07:27:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 07:27:09 +0200 |
commit | 3607f79d7869046d919fed05a21b55b6e61df1fa (patch) | |
tree | 9a176a4d5b67ac3a81ae210e9164d81959221ce0 /models/org_test.go | |
parent | 51775f65bc933843199320b040186703a2bb9f51 (diff) | |
download | gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.tar.gz gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.zip |
Fixed assert statements. (#16089)
Diffstat (limited to 'models/org_test.go')
-rw-r--r-- | models/org_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/models/org_test.go b/models/org_test.go index 66979714c1..bed7a6eb86 100644 --- a/models/org_test.go +++ b/models/org_test.go @@ -453,7 +453,7 @@ func TestAddOrgUser(t *testing.T) { assert.NoError(t, AddOrgUser(orgID, userID)) ou := &OrgUser{OrgID: orgID, UID: userID} AssertExistsAndLoadBean(t, ou) - assert.Equal(t, ou.IsPublic, isPublic) + assert.Equal(t, isPublic, ou.IsPublic) org = AssertExistsAndLoadBean(t, &User{ID: orgID}).(*User) assert.EqualValues(t, expectedNumMembers, org.NumMembers) } @@ -589,9 +589,9 @@ func TestHasOrgVisibleTypePublic(t *testing.T) { test1 := HasOrgVisible(org, owner) test2 := HasOrgVisible(org, user3) test3 := HasOrgVisible(org, nil) - assert.Equal(t, test1, true) // owner of org - assert.Equal(t, test2, true) // user not a part of org - assert.Equal(t, test3, true) // logged out user + assert.True(t, test1) // owner of org + assert.True(t, test2) // user not a part of org + assert.True(t, test3) // logged out user } func TestHasOrgVisibleTypeLimited(t *testing.T) { @@ -612,9 +612,9 @@ func TestHasOrgVisibleTypeLimited(t *testing.T) { test1 := HasOrgVisible(org, owner) test2 := HasOrgVisible(org, user3) test3 := HasOrgVisible(org, nil) - assert.Equal(t, test1, true) // owner of org - assert.Equal(t, test2, true) // user not a part of org - assert.Equal(t, test3, false) // logged out user + assert.True(t, test1) // owner of org + assert.True(t, test2) // user not a part of org + assert.False(t, test3) // logged out user } func TestHasOrgVisibleTypePrivate(t *testing.T) { @@ -635,9 +635,9 @@ func TestHasOrgVisibleTypePrivate(t *testing.T) { test1 := HasOrgVisible(org, owner) test2 := HasOrgVisible(org, user3) test3 := HasOrgVisible(org, nil) - assert.Equal(t, test1, true) // owner of org - assert.Equal(t, test2, false) // user not a part of org - assert.Equal(t, test3, false) // logged out user + assert.True(t, test1) // owner of org + assert.False(t, test2) // user not a part of org + assert.False(t, test3) // logged out user } func TestGetUsersWhoCanCreateOrgRepo(t *testing.T) { |