Skip to content

Commit

Permalink
gateway: add api to get authenticated user organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
tulliosorintdev committed Feb 21, 2022
1 parent 08f3063 commit 60f075a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1990,14 +1990,12 @@ func TestUserOrgs(t *testing.T) {
expectedOrgs := make([]*gwapitypes.UserOrgsResponse, 2)

expectedOrgs[0] = &gwapitypes.UserOrgsResponse{
Organization: &gwapitypes.OrgResponse{
ID: org01.ID, Name: "org01", Visibility: gwapitypes.VisibilityPublic},
Role: gwapitypes.MemberRoleMember}
Organization: &gwapitypes.OrgResponse{ID: org01.ID, Name: "org01", Visibility: gwapitypes.VisibilityPublic},
Role: gwapitypes.MemberRoleMember}

expectedOrgs[1] = &gwapitypes.UserOrgsResponse{
Organization: &gwapitypes.OrgResponse{
ID: org02.ID, Name: "org02", Visibility: gwapitypes.VisibilityPrivate},
Role: gwapitypes.MemberRoleOwner}
Organization: &gwapitypes.OrgResponse{ID: org02.ID, Name: "org02", Visibility: gwapitypes.VisibilityPrivate},
Role: gwapitypes.MemberRoleOwner}

if diff := cmp.Diff(expectedOrgs, orgs); diff != "" {
t.Fatalf("user orgs mismatch (-expected +got):\n%s", diff)
Expand Down

0 comments on commit 60f075a

Please sign in to comment.