1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-10 04:27:22 +00:00

Unit tests for routers/repo/issue_label (#3198)

This commit is contained in:
Ethan Koenig
2017-12-15 13:11:02 -08:00
committed by Lauris BH
parent bde0409433
commit befa7445d2
15 changed files with 231 additions and 42 deletions

View File

@ -303,9 +303,3 @@ func GetCSRF(t testing.TB, session *TestSession, urlStr string) string {
doc := NewHTMLParser(t, resp.Body)
return doc.GetCSRF()
}
func RedirectURL(t testing.TB, resp *httptest.ResponseRecorder) string {
urlSlice := resp.HeaderMap["Location"]
assert.NotEmpty(t, urlSlice, "No redirect URL founds")
return urlSlice[0]
}