mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Improve integration test helper functions (#2049)
Set request headers in helper functions, and new helper for requests with string-formatted URLs
This commit is contained in:
		@@ -90,7 +90,6 @@ func testNewIssue(t *testing.T, session *TestSession, user, repo, title string)
 | 
			
		||||
		"_csrf": htmlDoc.GetCSRF(),
 | 
			
		||||
		"title": title,
 | 
			
		||||
	})
 | 
			
		||||
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
 | 
			
		||||
	resp = session.MakeRequest(t, req)
 | 
			
		||||
	assert.EqualValues(t, http.StatusFound, resp.HeaderCode)
 | 
			
		||||
	redirectedURL := resp.Headers["Location"]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user