MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / TestBuildHTMLShellSelfHostedNeutral

Function TestBuildHTMLShellSelfHostedNeutral

internal/email/shell_test.go:12–43  ·  view source on GitHub ↗

TestBuildHTMLShellSelfHostedNeutral pins that self-hosted output carries no getpad.dev marketing footer. Operators ship Pad under their own brand and would not want the hosted-service footer imposed on transactional emails sent from their deployment.

(t *testing.T)

Source from the content-addressed store, hash-verified

10// their own brand and would not want the hosted-service footer
11// imposed on transactional emails sent from their deployment.
12func TestBuildHTMLShellSelfHostedNeutral(t *testing.T) {
13 out := buildHTMLShell("<p>body</p>", "footer note", false)
14
15 if !strings.Contains(out, "<strong style=\"font-size: 18px;\">Pad</strong>") {
16 t.Error("self-hosted should keep the Pad wordmark header")
17 }
18 if !strings.Contains(out, "<p>body</p>") {
19 t.Error("self-hosted should include the body content verbatim")
20 }
21 if !strings.Contains(out, "footer note") {
22 t.Error("self-hosted should include the footer note")
23 }
24
25 // The Cloud-only artifacts must not appear in self-hosted output.
26 cloudOnly := []string{
27 "github.com/PerpetualSoftware/pad",
28 "getpad.dev/docs",
29 "getpad.dev/changelog",
30 "getpad.dev/contribute",
31 "getpad.dev/faq",
32 "getpad.dev/security",
33 "getpad.dev/privacy",
34 "getpad.dev/terms",
35 "getpad.dev/subprocessors",
36 "Perpetual Software",
37 }
38 for _, marker := range cloudOnly {
39 if strings.Contains(out, marker) {
40 t.Errorf("self-hosted output unexpectedly contained Cloud-only marker %q", marker)
41 }
42 }
43}
44
45// TestBuildHTMLShellCloudIncludesMarketingFooter pins the Cloud-mode
46// marketing-footer link order from docs/brand.md §7 and the copyright

Callers

nothing calls this directly

Calls 2

buildHTMLShellFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected