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:
parent
7b9f439183
commit
22081f78a0
@ -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)
|
||||
|
||||
@ -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})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user