0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-06 09:35:20 +02:00

fix issue dependency tests

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-11-23 23:13:27 -05:00
parent 7b9f439183
commit 22081f78a0
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C
2 changed files with 9 additions and 7 deletions

View File

@ -506,7 +506,7 @@ func getFormIssue(ctx *context.APIContext, form *api.IssueMeta) *issues_model.Is
return nil
}
var err error
repo, err = repo_model.GetRepositoryByOwnerAndName(ctx, form.Owner, form.Name, ctx.PathParamInt64("group_id"))
repo, err = repo_model.GetRepositoryByOwnerAndName(ctx, form.Owner, form.Name, form.GroupID)
if err != nil {
if repo_model.IsErrRepoNotExist(err) {
ctx.APIErrorNotFound("IsErrRepoNotExist", err)

View File

@ -50,9 +50,10 @@ func TestAPICreateIssueDependencyCrossRepoPermission(t *testing.T) {
url := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/dependencies", "user2", "repo1", targetIssue.Index)
dependencyMeta := &api.IssueMeta{
Owner: "org3",
Name: "repo3",
Index: dependencyIssue.Index,
Owner: "org3",
Name: "repo3",
GroupID: 129,
Index: dependencyIssue.Index,
}
user40 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 40})
@ -111,9 +112,10 @@ func TestAPIDeleteIssueDependencyCrossRepoPermission(t *testing.T) {
url := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/dependencies", "user2", "repo1", targetIssue.Index)
dependencyMeta := &api.IssueMeta{
Owner: "org3",
Name: "repo3",
Index: dependencyIssue.Index,
Owner: "org3",
Name: "repo3",
GroupID: 129,
Index: dependencyIssue.Index,
}
user40 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 40})