mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 00:10:15 +00:00
Use httptest in integration tests (#3080)
This commit is contained in:
parent
993b86628b
commit
e59adcde65
12 changed files with 77 additions and 100 deletions
|
@ -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}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue