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)()
|
||||
nonAdminUsername := "user2"
|
||||
session := loginUser(t, nonAdminUsername)
|
||||
token := getTokenForLoggedInUser(t, session, "sudo")
|
||||
org := api.CreateOrgOption{
|
||||
UserName: "user2_org",
|
||||
FullName: "User2's organization",
|
||||
|
@ -83,6 +82,6 @@ func TestAPIAdminOrgCreateNotAdmin(t *testing.T) {
|
|||
Location: "Shanghai",
|
||||
Visibility: "public",
|
||||
}
|
||||
req := NewRequestWithJSON(t, "POST", "/api/v1/admin/users/user2/orgs?token="+token, &org)
|
||||
session.MakeRequest(t, req, http.StatusForbidden)
|
||||
req := NewRequestWithJSON(t, "POST", "/api/v1/admin/users/user2/orgs", &org)
|
||||
session.MakeRequest(t, req, http.StatusUnauthorized)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue