personal-site/controllers/about_test.go
2021-12-06 07:42:20 -05:00

18 lines
303 B
Go

package controllers
import (
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestAbout_Get(t *testing.T) {
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())
}