aboutsummaryrefslogtreecommitdiff
path: root/HutchTests/InboxViewModelTests.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-07-15 21:42:38 -0500
committerChristian Cleberg <[email protected]>2026-07-15 21:42:38 -0500
commitccec322f8eac4d14638f5abdae7dae7abc95eb7e (patch)
tree7eb92e38d5dc88ba839b94c294ae9be0ea21a6d0 /HutchTests/InboxViewModelTests.swift
parentb9ec80716ea015de5b6b31395fdc5ff03191398c (diff)
downloadhutch-ccec322f8eac4d14638f5abdae7dae7abc95eb7e.tar.gz
hutch-ccec322f8eac4d14638f5abdae7dae7abc95eb7e.tar.bz2
hutch-ccec322f8eac4d14638f5abdae7dae7abc95eb7e.zip
refactor: share the email body diff splitter
segmentMessageBody and its helpers were private to ThreadViewModel, reachable from tests only through a segmentMessageBodyForTesting shim. Patchset review needs the same splitting, because sr.ht's Patch type carries no diff — the diff only exists inside the email body — so this has to be shared rather than duplicated. Moved to InboxThreadUtilities. The shim is gone; the existing test calls the real function directly now. Also adds the Patchset model layer that the coming views build on.
Diffstat (limited to 'HutchTests/InboxViewModelTests.swift')
-rw-r--r--HutchTests/InboxViewModelTests.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/HutchTests/InboxViewModelTests.swift b/HutchTests/InboxViewModelTests.swift
index 7bfc199..e67d317 100644
--- a/HutchTests/InboxViewModelTests.swift
+++ b/HutchTests/InboxViewModelTests.swift
@@ -186,7 +186,7 @@ struct InboxViewModelTests {
2.50.1 (Apple Git-155)
"""
- let segments = ThreadViewModel.segmentMessageBodyForTesting(body, isPatch: true)
+ let segments = InboxThreadUtilities.segmentMessageBody(body, isPatch: true)
#expect(segments.count == 3)