bab29a83fa
Sweep all .go imports + go.mod, plus module-path refs in .golangci.yml, Dockerfile, swagger templates, locale example, and repo/wiki URLs (MokoGitea-Fork -> MokoGIT). Part of the MokoGIT rebrand. Claude-Session: https://claude.ai/code/session_01Bqe7fAuHQeiLueYfeHFrHw
26 lines
684 B
Go
26 lines
684 B
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package integration
|
|
|
|
import (
|
|
"net/http"
|
|
"testing"
|
|
|
|
auth_model "code.mokoconsulting.tech/MokoConsulting/MokoGIT/models/auth"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGIT/tests"
|
|
)
|
|
|
|
func TestAPIUpdateUser(t *testing.T) {
|
|
defer tests.PrepareTestEnv(t)()
|
|
|
|
normalUsername := "user2"
|
|
session := loginUser(t, normalUsername)
|
|
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteUser)
|
|
|
|
req := NewRequestWithJSON(t, "PATCH", "/api/v1/user/settings", map[string]string{
|
|
"website": "https://gitea.com",
|
|
}).AddTokenAuth(token)
|
|
MakeRequest(t, req, http.StatusOK)
|
|
}
|