internal/web/web_test.go

191da4bb528ee095de7ce47d59ee2c8e456cf483
gitbay/internal/web/web_test.go

19 lines · 619 bytes

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

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form