HutchTests/TrackerListViewModelTests.swift
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}