0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-03 21:12:09 +02:00

revert: fixture and test changes

give all existing fixture repos a group id of 0
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-12-19 23:17:28 -05:00
parent cdf24a58a2
commit d4f6f2b952
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -11,14 +11,12 @@ import (
auth_model "code.gitea.io/gitea/models/auth"
"code.gitea.io/gitea/models/db"
group_model "code.gitea.io/gitea/models/group"
"code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/models/perm"
"code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/models/unittest"
user_model "code.gitea.io/gitea/models/user"
api "code.gitea.io/gitea/modules/structs"
group_service "code.gitea.io/gitea/services/group"
"code.gitea.io/gitea/tests"
"github.com/stretchr/testify/assert"
@ -203,12 +201,6 @@ func testOrgRestrictedUser(t *testing.T) {
AddTokenAuth(token)
_ = adminSession.MakeRequest(t, req, http.StatusNoContent)
// we also need to give this new team access to the repo's group
g := unittest.AssertExistsAndLoadBean[*group_model.Group](t, &group_model.Group{
ID: int64(repoGroup),
})
assert.NoError(t, group_service.AddTeamToGroup(t.Context(), g, apiTeam.Name))
// Now we need to check if the restrictedUser can access the repo
req = NewRequest(t, "GET", "/"+orgName)
restrictedSession.MakeRequest(t, req, http.StatusOK)