aboutsummaryrefslogtreecommitdiffstats
path: root/models/issue_xref_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-12-13 22:21:06 +0000
committerAntoine GIRARD <sapk@users.noreply.github.com>2019-12-13 23:21:06 +0100
commit74179d1b5e739b3fa0d0915bb35d6b7596fd13af (patch)
treefd8eb776c254b716a4e2d416bb6903f1c4c90ea7 /models/issue_xref_test.go
parent8f16a2c37b4f2650f5e9623a92eb368db9564c6f (diff)
downloadgitea-74179d1b5e739b3fa0d0915bb35d6b7596fd13af.tar.gz
gitea-74179d1b5e739b3fa0d0915bb35d6b7596fd13af.zip
Remove SavePatch and generate patches on the fly (#9302)
* Save patches to temporary files * Remove SavePatch and generate patches on the fly * Use ioutil.TempDir * fixup! Use ioutil.TempDir * fixup! fixup! Use ioutil.TempDir * RemoveAll LocalCopyPath() in initIntergrationTest * Default to status checking on PR creation * Remove unnecessary set to StatusChecking * Protect against unable to load repo * Handle conflicts * Restore original conflict setting * In TestPullRequests update status to StatusChecking before running TestPatch
Diffstat (limited to 'models/issue_xref_test.go')
-rw-r--r--models/issue_xref_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/issue_xref_test.go b/models/issue_xref_test.go
index c13577e905..d8defd99c6 100644
--- a/models/issue_xref_test.go
+++ b/models/issue_xref_test.go
@@ -142,8 +142,8 @@ func testCreatePR(t *testing.T, repo, doer int64, title, content string) *PullRe
r := AssertExistsAndLoadBean(t, &Repository{ID: repo}).(*Repository)
d := AssertExistsAndLoadBean(t, &User{ID: doer}).(*User)
i := &Issue{RepoID: r.ID, PosterID: d.ID, Poster: d, Title: title, Content: content, IsPull: true}
- pr := &PullRequest{HeadRepoID: repo, BaseRepoID: repo, HeadBranch: "head", BaseBranch: "base"}
- assert.NoError(t, NewPullRequest(r, i, nil, nil, pr, nil))
+ pr := &PullRequest{HeadRepoID: repo, BaseRepoID: repo, HeadBranch: "head", BaseBranch: "base", Status: PullRequestStatusMergeable}
+ assert.NoError(t, NewPullRequest(r, i, nil, nil, pr))
pr.Issue = i
return pr
}