diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-10-10 11:48:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 03:48:21 +0000 |
commit | dd83cfcacc989d0e7cbd21ec5eba029fdfcb72dd (patch) | |
tree | f2d23e3e6e8a1f010593bafe94f42081a7b2a4cb /tests/integration/api_packages_container_test.go | |
parent | 368b0881f502dd36a1ae725493c85683803fd816 (diff) | |
download | gitea-dd83cfcacc989d0e7cbd21ec5eba029fdfcb72dd.tar.gz gitea-dd83cfcacc989d0e7cbd21ec5eba029fdfcb72dd.zip |
Refactor CSRF token (#32216)
Diffstat (limited to 'tests/integration/api_packages_container_test.go')
-rw-r--r-- | tests/integration/api_packages_container_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/api_packages_container_test.go b/tests/integration/api_packages_container_test.go index 409e7513a6..3905ad1b70 100644 --- a/tests/integration/api_packages_container_test.go +++ b/tests/integration/api_packages_container_test.go @@ -784,7 +784,7 @@ func TestPackageContainer(t *testing.T) { newOwnerName := "newUsername" req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{ - "_csrf": GetCSRF(t, session, "/user/settings"), + "_csrf": GetUserCSRFToken(t, session), "name": newOwnerName, "email": "user2@example.com", "language": "en-US", @@ -794,7 +794,7 @@ func TestPackageContainer(t *testing.T) { t.Run(fmt.Sprintf("Catalog[%s]", newOwnerName), checkCatalog(newOwnerName)) req = NewRequestWithValues(t, "POST", "/user/settings", map[string]string{ - "_csrf": GetCSRF(t, session, "/user/settings"), + "_csrf": GetUserCSRFToken(t, session), "name": user.Name, "email": "user2@example.com", "language": "en-US", |