package web import "testing" // Every page template parses with the layout at start-up, so a broken // template fails the process rather than the first visit to its page. // Package init has already done the work; this asserts it covered every // file (#116). func TestEveryPageTemplateParses(t *testing.T) { names := Pages() if len(names) < 30 { t.Fatalf("only %d page templates parsed: %v", len(names), names) } for _, want := range []string{"tree.html", "blob.html", "mr.html", "issue.html", "dashboard.html", "registered.html"} { if _, ok := pages[want]; !ok { t.Errorf("%s not parsed", want) } } }