fix api user orgs test

This commit is contained in:
yp05327 2023-11-17 01:03:30 +00:00
parent bff0db2601
commit 3d98673fd6
1 changed files with 24 additions and 24 deletions

View File

@ -32,18 +32,6 @@ func TestUserOrgs(t *testing.T) {
org35 := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "private_org35"})
assert.Equal(t, []*api.Organization{
{
ID: 35,
Name: org35.Name,
UserName: org35.Name,
FullName: org35.FullName,
Email: org35.Email,
AvatarURL: org35.AvatarLink(db.DefaultContext),
Description: "",
Website: "",
Location: "",
Visibility: "private",
},
{
ID: 17,
Name: org17.Name,
@ -68,6 +56,18 @@ func TestUserOrgs(t *testing.T) {
Location: "",
Visibility: "public",
},
{
ID: 35,
Name: org35.Name,
UserName: org35.Name,
FullName: org35.FullName,
Email: org35.Email,
AvatarURL: org35.AvatarLink(db.DefaultContext),
Description: "",
Website: "",
Location: "",
Visibility: "private",
},
}, orgs)
// user itself should get it's org's he is a member of
@ -117,18 +117,6 @@ func TestMyOrgs(t *testing.T) {
org35 := unittest.AssertExistsAndLoadBean(t, &user_model.User{Name: "private_org35"})
assert.Equal(t, []*api.Organization{
{
ID: 35,
Name: org35.Name,
UserName: org35.Name,
FullName: org35.FullName,
Email: org35.Email,
AvatarURL: org35.AvatarLink(db.DefaultContext),
Description: "",
Website: "",
Location: "",
Visibility: "private",
},
{
ID: 17,
Name: org17.Name,
@ -153,5 +141,17 @@ func TestMyOrgs(t *testing.T) {
Location: "",
Visibility: "public",
},
{
ID: 35,
Name: org35.Name,
UserName: org35.Name,
FullName: org35.FullName,
Email: org35.Email,
AvatarURL: org35.AvatarLink(db.DefaultContext),
Description: "",
Website: "",
Location: "",
Visibility: "private",
},
}, orgs)
}