HutchTests/TrackerListViewModelTests.swift

5d64fcf7f48ccee0ed9ec87be276d7d0de6288f6
hutch/HutchTests/TrackerListViewModelTests.swift history · blame · raw

16 lines · 447 bytes

 1import Foundation
 2import Testing
 3@testable import Hutch
 4
 5struct TrackerListViewModelTests {
 6
 7    @Test
 8    @MainActor
 9    func graphQLErrorDescriptionIsPreservedForTrackerCreationFailures() {
10        let error = SRHTError.graphQLErrors([
11            GraphQLError(message: "A tracker named bugs already exists", locations: nil)
12        ])
13
14        #expect(error.localizedDescription == "GraphQL error: A tracker named bugs already exists")
15    }
16}