mirror of https://github.com/go-gitea/gitea.git
Have the closed PR test create a new branch
This commit is contained in:
parent
5722bb4f48
commit
c89d78dfa1
|
@ -194,7 +194,7 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) {
|
||||||
resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "master", "This is a pull title")
|
resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "master", "This is a pull title")
|
||||||
elem := strings.Split(test.RedirectURL(resp), "/")
|
elem := strings.Split(test.RedirectURL(resp), "/")
|
||||||
assert.EqualValues(t, "pulls", elem[3])
|
assert.EqualValues(t, "pulls", elem[3])
|
||||||
testPullMerge(t, user1Session, elem[1], elem[2], elem[4], repo_model.MergeStyleMerge, true)
|
testPullMerge(t, user1Session, elem[1], elem[2], elem[4], repo_model.MergeStyleMerge, false)
|
||||||
|
|
||||||
// Grab the CSRF token.
|
// Grab the CSRF token.
|
||||||
req := NewRequest(t, "GET", path.Join(elem[1], elem[2], "pulls", elem[4]))
|
req := NewRequest(t, "GET", path.Join(elem[1], elem[2], "pulls", elem[4]))
|
||||||
|
@ -210,8 +210,8 @@ func TestPullView_GivenApproveOrRejectReviewOnClosedPR(t *testing.T) {
|
||||||
|
|
||||||
t.Run("Submit approve/reject review on closed PR", func(t *testing.T) {
|
t.Run("Submit approve/reject review on closed PR", func(t *testing.T) {
|
||||||
// Created a closed PR (made by user1) in the upstream repo1.
|
// Created a closed PR (made by user1) in the upstream repo1.
|
||||||
testEditFile(t, user1Session, "user1", "repo1", "master", "README.md", "Hello, World (Edited)\n")
|
testEditFileToNewBranch(t, user1Session, "user1", "repo1", "master", "a-test-branch", "README.md", "Hello, World (Editied...again)\n")
|
||||||
resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "master", "This is a pull title")
|
resp := testPullCreate(t, user1Session, "user1", "repo1", false, "master", "a-test-branch", "This is a pull title")
|
||||||
elem := strings.Split(test.RedirectURL(resp), "/")
|
elem := strings.Split(test.RedirectURL(resp), "/")
|
||||||
assert.EqualValues(t, "pulls", elem[3])
|
assert.EqualValues(t, "pulls", elem[3])
|
||||||
testIssueClose(t, user1Session, elem[1], elem[2], elem[4])
|
testIssueClose(t, user1Session, elem[1], elem[2], elem[4])
|
||||||
|
|
Loading…
Reference in New Issue