Easier get request controller testing.
This commit is contained in:
parent
e499257686
commit
a5d8d2ea35
2 changed files with 28 additions and 13 deletions
|
|
@ -8,9 +8,10 @@ import (
|
|||
)
|
||||
|
||||
func TestAbout_Get(t *testing.T) {
|
||||
resp := GetRequest(t, "about")
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
doc := GetGoqueryDoc(t, resp)
|
||||
doc := getRequest(t, "about").
|
||||
assertStatusCode(http.StatusOK).
|
||||
toDoc()
|
||||
|
||||
h1 := doc.Find("h1.title")
|
||||
assert.Len(t, h1.Nodes, 1)
|
||||
assert.Equal(t, "About", h1.Text())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue