Fix failing tests
This commit is contained in:
parent
de662207a4
commit
071fe391c2
1 changed files with 2 additions and 3 deletions
|
@ -74,7 +74,6 @@ func TestAPIAdminOrgCreateNotAdmin(t *testing.T) {
|
||||||
defer tests.PrepareTestEnv(t)()
|
defer tests.PrepareTestEnv(t)()
|
||||||
nonAdminUsername := "user2"
|
nonAdminUsername := "user2"
|
||||||
session := loginUser(t, nonAdminUsername)
|
session := loginUser(t, nonAdminUsername)
|
||||||
token := getTokenForLoggedInUser(t, session, "sudo")
|
|
||||||
org := api.CreateOrgOption{
|
org := api.CreateOrgOption{
|
||||||
UserName: "user2_org",
|
UserName: "user2_org",
|
||||||
FullName: "User2's organization",
|
FullName: "User2's organization",
|
||||||
|
@ -83,6 +82,6 @@ func TestAPIAdminOrgCreateNotAdmin(t *testing.T) {
|
||||||
Location: "Shanghai",
|
Location: "Shanghai",
|
||||||
Visibility: "public",
|
Visibility: "public",
|
||||||
}
|
}
|
||||||
req := NewRequestWithJSON(t, "POST", "/api/v1/admin/users/user2/orgs?token="+token, &org)
|
req := NewRequestWithJSON(t, "POST", "/api/v1/admin/users/user2/orgs", &org)
|
||||||
session.MakeRequest(t, req, http.StatusForbidden)
|
session.MakeRequest(t, req, http.StatusUnauthorized)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue