saasitone/routes/about_test.go

21 lines
316 B
Go
Raw Normal View History

2021-12-14 08:13:53 -08:00
package routes
2021-12-05 17:22:45 -08:00
import (
"net/http"
"testing"
"github.com/stretchr/testify/assert"
)
func TestAbout_Get(t *testing.T) {
2021-12-06 07:38:55 -08:00
doc := request(t).
setRoute("about").
get().
2021-12-06 04:42:20 -08:00
assertStatusCode(http.StatusOK).
toDoc()
2021-12-05 17:22:45 -08:00
h1 := doc.Find("h1.title")
assert.Len(t, h1.Nodes, 1)
assert.Equal(t, "About", h1.Text())
}