fix template test renderer, add category
This commit is contained in:
parent
d9146750ba
commit
e4317ec4fd
15 changed files with 171 additions and 103 deletions
|
@ -8,9 +8,9 @@ import (
|
|||
)
|
||||
|
||||
func TestMainLayout(t *testing.T) {
|
||||
r := templatetesting.Template(t, "layouts/main", struct{ HeadTitle string }{HeadTitle: "roleypoly"})
|
||||
assert.Contains(t, r, "%%EMBED%%", "has {{embed}}")
|
||||
r := templatetesting.Template(t, "components/blank", struct{ HeadTitle string }{HeadTitle: "roleypoly"}, "layouts/main")
|
||||
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")
|
||||
assert.Contains(t, r, "<h1>hello world</h1>", "has {{embed}}")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue