From 86bcd9452d3107f68aca085e03e69b02667c0dbb Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 12 Apr 2026 22:06:16 -0500 Subject: feat: polish read-only project views and home integration Refs: https://todo.sr.ht/~ccleberg/hutch/36 Refs: https://todo.sr.ht/~ccleberg/hutch/37 Refs: https://todo.sr.ht/~ccleberg/hutch/38 --- HutchTests/ProjectTests.swift | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'HutchTests/ProjectTests.swift') diff --git a/HutchTests/ProjectTests.swift b/HutchTests/ProjectTests.swift index b47356e..eff800f 100644 --- a/HutchTests/ProjectTests.swift +++ b/HutchTests/ProjectTests.swift @@ -71,4 +71,25 @@ struct ProjectTests { #expect(project.resourceSummary == "Website linked") } + + @Test + func displayHelpersNormalizeBlankValues() { + let project = Project( + id: "project-1", + name: " ", + description: "\n", + website: "https://example.com", + visibility: .unlisted, + tags: [" docs ", "", "Docs", "ios"], + updated: Date(timeIntervalSince1970: 0), + mailingLists: [], + sources: [], + trackers: [] + ) + + #expect(project.displayName == "Untitled Project") + #expect(project.displayDescription == nil) + #expect(project.displayTags == ["docs", "ios"]) + #expect(project.metadataLine.contains("Unlisted")) + } } -- cgit v1.2.3