diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-28 10:16:18 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-28 10:16:18 +0200 |
| commit | 73c6a37ecf0aac04711e5624455743b3493a7ef5 (patch) | |
| tree | ac58cce0dcd03ccac3f5f3e313a46ebe9d352b30 /internal/showcase/showcase_test.go | |
| parent | 1615abaacccdbb5002404a77270fd333ce8ad718 (diff) | |
Diffstat (limited to 'internal/showcase/showcase_test.go')
| -rw-r--r-- | internal/showcase/showcase_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/showcase/showcase_test.go b/internal/showcase/showcase_test.go index fa18799..cd571f8 100644 --- a/internal/showcase/showcase_test.go +++ b/internal/showcase/showcase_test.go @@ -148,6 +148,25 @@ func TestFormatGemtext_SanitizesMarkdownHeadingsInSummary(t *testing.T) { } } +func TestFormatGemtext_IncludesCgitLink(t *testing.T) { + t.Parallel() + + g := &Generator{config: &config.Config{}} + content := g.formatGemtext([]ProjectSummary{ + { + Name: "cpuinfo", + Summary: "summary", + CodebergURL: "https://codeberg.org/snonux/cpuinfo", + GitHubURL: "https://github.com/snonux/cpuinfo", + CgitURL: "https://cgit.f3s.buetow.org/cpuinfo/", + }, + }) + + if !strings.Contains(content, "=> https://cgit.f3s.buetow.org/cpuinfo/ View in cgit\n") { + t.Fatalf("cgit link was not rendered: %s", content) + } +} + func TestFindReadmeContent_UsesRepoPathWithoutChangingCWD(t *testing.T) { t.Parallel() |
