aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/web_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/web_test.go')
-rw-r--r--internal/web/web_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/web/web_test.go b/internal/web/web_test.go
index 1ca2677..a7c189f 100644
--- a/internal/web/web_test.go
+++ b/internal/web/web_test.go
@@ -131,6 +131,11 @@ func TestThemeNormalizeAndCSS(t *testing.T) {
if css := DefaultTheme().CSS(); strings.Contains(css, "@font-face") || strings.Contains(css, "h1, h2") {
t.Errorf("default css should declare no font faces or heading rule: %s", css)
}
+ // Fira Code is the one built-in choice that is a web font: its face is declared when either font uses it.
+ css = ThemeFromForm(DefaultTheme(), url.Values{"heading_font": {"fira"}}).CSS()
+ if !strings.Contains(css, `@font-face { font-family:"Fira Code"; src:url(/static/FiraCode-VF.woff2)`) || !strings.Contains(css, `h1, h2, h3, h4, h5, h6 { font-family:"Fira Code", "Fira Mono"`) {
+ t.Errorf("fira css: %s", css)
+ }
}
// The rule under titles is a body class blog.css draws from, coloured by the