16 lines
527 B
Go
16 lines
527 B
Go
package layouts_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.sapphic.engineer/roleypoly/v4/templates/templatetesting"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestMainLayout(t *testing.T) {
|
|
r := templatetesting.Template(t, "layouts/main", struct{ HeadTitle string }{HeadTitle: "roleypoly"})
|
|
assert.Contains(t, r, "%%EMBED%%", "has {{embed}}")
|
|
assert.Contains(t, r, "<nav>", "loaded navigation (open)")
|
|
assert.Contains(t, r, "</nav>", "loaded navigation (close)")
|
|
assert.Contains(t, r, "<title>roleypoly</title>", "sets title")
|
|
}
|