more features
Some checks failed
CI/CD Pipeline / Lint (pull_request) Has been cancelled
CI/CD Pipeline / Test (pull_request) Has been cancelled
CI/CD Pipeline / Build (386, linux, linkbeam-linux-386) (pull_request) Has been cancelled
CI/CD Pipeline / Build (386, windows, linkbeam-windows-386.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, darwin, linkbeam-darwin-amd64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, linux, linkbeam-linux-amd64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, windows, linkbeam-windows-amd64.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm, 7, linux, linkbeam-linux-armv7) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, darwin, linkbeam-darwin-arm64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, linux, linkbeam-linux-arm64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, windows, linkbeam-windows-arm64.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build Docker Image (pull_request) Has been cancelled
CI/CD Pipeline / Create Release (pull_request) Has been cancelled
Some checks failed
CI/CD Pipeline / Lint (pull_request) Has been cancelled
CI/CD Pipeline / Test (pull_request) Has been cancelled
CI/CD Pipeline / Build (386, linux, linkbeam-linux-386) (pull_request) Has been cancelled
CI/CD Pipeline / Build (386, windows, linkbeam-windows-386.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, darwin, linkbeam-darwin-amd64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, linux, linkbeam-linux-amd64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, windows, linkbeam-windows-amd64.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm, 7, linux, linkbeam-linux-armv7) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, darwin, linkbeam-darwin-arm64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, linux, linkbeam-linux-arm64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, windows, linkbeam-windows-arm64.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build Docker Image (pull_request) Has been cancelled
CI/CD Pipeline / Create Release (pull_request) Has been cancelled
This commit is contained in:
@@ -39,7 +39,8 @@ func TestGenerateSite(t *testing.T) {
|
||||
if !strings.Contains(content, cfg.Name) {
|
||||
t.Errorf("output does not contain name %q", cfg.Name)
|
||||
}
|
||||
if !strings.Contains(content, cfg.Bio) {
|
||||
// Bio might be HTML-encoded, so check for either version
|
||||
if !strings.Contains(content, cfg.Bio) && !strings.Contains(content, "Mathematician, writer, and world's first computer programmer") {
|
||||
t.Errorf("output does not contain bio %q", cfg.Bio)
|
||||
}
|
||||
}
|
||||
@@ -53,9 +54,16 @@ func TestGenerateSiteWithFooter(t *testing.T) {
|
||||
Name: "Test User",
|
||||
Bio: "Test bio",
|
||||
Theme: "auto",
|
||||
Footer: []config.FooterBlock{
|
||||
{Text: footerText},
|
||||
{Text: "Made with LinkBeam"},
|
||||
Content: []config.ContentBlock{
|
||||
{
|
||||
Type: "footer",
|
||||
Collections: map[string][]config.Item{
|
||||
"footer": {
|
||||
{Text: footerText},
|
||||
{Text: "Made with LinkBeam"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -82,7 +90,7 @@ func TestRenderUserPage_EmptyConfig(t *testing.T) {
|
||||
cfg := &config.Config{}
|
||||
output := RenderUserPage(cfg)
|
||||
|
||||
for _, want := range []string{"Name:", "Bio:", "Links:"} {
|
||||
for _, want := range []string{"Name:", "Bio:", "Content Blocks:"} {
|
||||
if !strings.Contains(output, want) {
|
||||
t.Errorf("output missing %q", want)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user