summaryrefslogtreecommitdiff
path: root/HutchTests/HomeViewModelTests.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-07-15 19:19:43 -0500
committerChristian Cleberg <[email protected]>2026-07-15 19:19:43 -0500
commit4346adc50f01be7f7322249d32745d119c757ff2 (patch)
treeb530424272118e56d1545de460f3cf2433d8ae89 /HutchTests/HomeViewModelTests.swift
parented572a864debd7df840ea5873173be18ff27e809 (diff)
downloadhutch-4346adc50f01be7f7322249d32745d119c757ff2.tar.gz
hutch-4346adc50f01be7f7322249d32745d119c757ff2.tar.bz2
hutch-4346adc50f01be7f7322249d32745d119c757ff2.zip
test: repair stale expectations and request-body capture
These tests drifted from the code and went unnoticed because CI never ran them. All four are test-side errors; no app behavior is involved. - TicketListViewModelTests asserted lowercase "resolved"/"fixed"/"reported" against TicketStatus/TicketResolution rawValues, which are uppercase to match the todo.sr.ht GraphQL enums. - HomeViewModelTests expected failedBuilds in ascending id order. Ordering moved to newest-first when sortBuildItemsForTriage landed in 5f6d545; the filtering the test covers is unchanged. - SettingsViewModelTests read request.httpBody inside a URLProtocol, where it is always nil because URLSession moves the body onto httpBodyStream. The stub now reads the body off the stream at capture time.
Diffstat (limited to 'HutchTests/HomeViewModelTests.swift')
-rw-r--r--HutchTests/HomeViewModelTests.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/HutchTests/HomeViewModelTests.swift b/HutchTests/HomeViewModelTests.swift
index e4f6d9a..851b520 100644
--- a/HutchTests/HomeViewModelTests.swift
+++ b/HutchTests/HomeViewModelTests.swift
@@ -15,7 +15,7 @@ struct HomeViewModelTests {
let failedBuilds = HomeViewModel.failedBuilds(from: jobs)
- #expect(failedBuilds.map(\.job.id) == [2, 3])
+ #expect(failedBuilds.map(\.job.id) == [3, 2])
}
@Test