mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 23:34:11 +02:00
Use httptest in integration tests (#3080)
This commit is contained in:
1 parent
993b86628b
commit
e59adcde65
12 files changed
+77
-100
No files matched your search
@@ -18,8 +18,8 @@ type HTMLDoc struct {
|
||||
}
|
||||
|
||||
// NewHTMLParser parse html file
|
||||
func NewHTMLParser(t testing.TB, content []byte) *HTMLDoc {
|
||||
doc, err := goquery.NewDocumentFromReader(bytes.NewReader(content))
|
||||
func NewHTMLParser(t testing.TB, body *bytes.Buffer) *HTMLDoc {
|
||||
doc, err := goquery.NewDocumentFromReader(body)
|
||||
assert.NoError(t, err)
|
||||
return &HTMLDoc{doc: doc}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user