diff options
Diffstat (limited to 'HutchTests/TrackerListViewModelTests.swift')
| -rw-r--r-- | HutchTests/TrackerListViewModelTests.swift | 16 |
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") + } +} |
