Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify user update methods #28733

Merged
merged 12 commits into from
Feb 4, 2024
Prev Previous commit
Next Next commit
Fix test.
  • Loading branch information
KN4CK3R committed Jan 9, 2024
commit d8d87b3cb5caf55d781e1afe93ec8c97f93fad8e
6 changes: 3 additions & 3 deletions tests/integration/api_admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ func TestAPIRenameUser(t *testing.T) {
// required
"new_name": "User2",
}).AddTokenAuth(token)
MakeRequest(t, req, http.StatusOK)
MakeRequest(t, req, http.StatusNoContent)

urlStr = fmt.Sprintf("/api/v1/admin/users/%s/rename", "User2")
req = NewRequestWithValues(t, "POST", urlStr, map[string]string{
// required
"new_name": "User2-2-2",
}).AddTokenAuth(token)
MakeRequest(t, req, http.StatusOK)
MakeRequest(t, req, http.StatusNoContent)

req = NewRequestWithValues(t, "POST", urlStr, map[string]string{
// required
Expand All @@ -281,7 +281,7 @@ func TestAPIRenameUser(t *testing.T) {
// required
"new_name": "user2",
}).AddTokenAuth(token)
MakeRequest(t, req, http.StatusOK)
MakeRequest(t, req, http.StatusNoContent)
}

func TestAPICron(t *testing.T) {
Expand Down