summaryrefslogtreecommitdiff
path: root/HutchTests/TrackerListViewModelTests.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-03-18 20:03:39 -0500
committerChristian Cleberg <[email protected]>2026-03-18 20:03:39 -0500
commit090c829a5f800266da7f4ff0e59fb389f0dbfdd8 (patch)
tree8861ac737cf90f38a740f9f7ce913f192585af2a /HutchTests/TrackerListViewModelTests.swift
parent01ce5ee73feb8bda35749a186c0efcd3d6d7a060 (diff)
downloadhutch-090c829a5f800266da7f4ff0e59fb389f0dbfdd8.tar.gz
hutch-090c829a5f800266da7f4ff0e59fb389f0dbfdd8.tar.bz2
hutch-090c829a5f800266da7f4ff0e59fb389f0dbfdd8.zip
show tracker creation errors inside the creation sheet
Diffstat (limited to 'HutchTests/TrackerListViewModelTests.swift')
-rw-r--r--HutchTests/TrackerListViewModelTests.swift16
1 files changed, 16 insertions, 0 deletions
diff --git a/HutchTests/TrackerListViewModelTests.swift b/HutchTests/TrackerListViewModelTests.swift
new file mode 100644
index 0000000..1caedea
--- /dev/null
+++ b/HutchTests/TrackerListViewModelTests.swift
@@ -0,0 +1,16 @@
+import Foundation
+import Testing
+@testable import Hutch
+
+struct TrackerListViewModelTests {
+
+ @Test
+ @MainActor
+ func graphQLErrorDescriptionIsPreservedForTrackerCreationFailures() {
+ let error = SRHTError.graphQLErrors([
+ GraphQLError(message: "A tracker named bugs already exists", locations: nil)
+ ])
+
+ #expect(error.localizedDescription == "GraphQL error: A tracker named bugs already exists")
+ }
+}