diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-11 18:39:16 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-11 18:39:16 +0200 |
| commit | 0011f18e8494a4e57dc277b826d56c0a1df041ce (patch) | |
| tree | 7ffc0ad73b95c32b201adabbaf8baccbdbf6b04f /internal/showcase/showcase_test.go | |
| parent | 8e3b69cdface52a755ee64003832557e8b15e23b (diff) | |
refactor(internal): extract sync and summary helpers
Diffstat (limited to 'internal/showcase/showcase_test.go')
| -rw-r--r-- | internal/showcase/showcase_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/showcase/showcase_test.go b/internal/showcase/showcase_test.go index f480bdb..fb20c96 100644 --- a/internal/showcase/showcase_test.go +++ b/internal/showcase/showcase_test.go @@ -149,3 +149,14 @@ func TestFindReadmeContent_UsesRepoPathWithoutChangingCWD(t *testing.T) { t.Fatalf("unexpected README content: %q", string(content)) } } + +func TestFallbackSummary_UsesFirstReadmeParagraph(t *testing.T) { + t.Parallel() + + readme := []byte("first paragraph\n\nsecond paragraph") + summary := fallbackSummary("repo", readme, true) + + if summary != "first paragraph" { + t.Fatalf("expected first paragraph summary, got %q", summary) + } +} |
