summaryrefslogtreecommitdiff
path: root/HutchTests/AppStateTests.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-03-22 20:40:53 -0500
committerChristian Cleberg <[email protected]>2026-03-22 20:40:53 -0500
commit3ed2bb4da64d7cc9b67ef86a3892ab41b14fcc51 (patch)
tree3194f6f3303f4092715f3467ee3d270c2b26427d /HutchTests/AppStateTests.swift
parent866f9517dba3c878197b0290dd8b4d1becb153c3 (diff)
downloadhutch-3ed2bb4da64d7cc9b67ef86a3892ab41b14fcc51.tar.gz
hutch-3ed2bb4da64d7cc9b67ef86a3892ab41b14fcc51.tar.bz2
hutch-3ed2bb4da64d7cc9b67ef86a3892ab41b14fcc51.zip
feat: surface an alert when a deep link fails to resolve
Diffstat (limited to 'HutchTests/AppStateTests.swift')
-rw-r--r--HutchTests/AppStateTests.swift25
1 files changed, 25 insertions, 0 deletions
diff --git a/HutchTests/AppStateTests.swift b/HutchTests/AppStateTests.swift
new file mode 100644
index 0000000..ca34df2
--- /dev/null
+++ b/HutchTests/AppStateTests.swift
@@ -0,0 +1,25 @@
+import Testing
+@testable import Hutch
+
+struct AppStateTests {
+
+ @Test
+ @MainActor
+ func presentRepositoryDeepLinkErrorSetsUserFacingMessage() {
+ let appState = AppState()
+
+ appState.presentRepositoryDeepLinkError()
+
+ #expect(appState.deepLinkError == "The repository could not be found or is inaccessible.")
+ }
+
+ @Test
+ @MainActor
+ func presentTicketDeepLinkErrorSetsUserFacingMessage() {
+ let appState = AppState()
+
+ appState.presentTicketDeepLinkError()
+
+ #expect(appState.deepLinkError == "The ticket could not be found or is inaccessible.")
+ }
+}