mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	* Make branch deletion URL more like GitHub's, fixes #1397 * Add PR branch deletion integration test * Do not allow deleting protected branch * Change http error code to 403 if user has no write rights to repository * Add check to not panic if forked repository has alrady been deleted
This commit is contained in:
		| @@ -7,6 +7,7 @@ package integrations | ||||
| import ( | ||||
| 	"net/http" | ||||
| 	"path" | ||||
| 	"strings" | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/stretchr/testify/assert" | ||||
| @@ -21,6 +22,9 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo, branch strin | ||||
| 	htmlDoc := NewHTMLParser(t, resp.Body) | ||||
| 	link, exists := htmlDoc.doc.Find("button.ui.green.small.button").Parent().Attr("href") | ||||
| 	assert.True(t, exists, "The template has changed") | ||||
| 	if branch != "master" { | ||||
| 		link = strings.Replace(link, ":master", ":"+branch, 1) | ||||
| 	} | ||||
|  | ||||
| 	req = NewRequest(t, "GET", link) | ||||
| 	resp = session.MakeRequest(t, req) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user