krz/hutch

an ios client for sourcehut

clone: git clone https://gitbay.org/krz/hutch.git

v2: HutchTests/TrackerListViewModelTests.swift · raw

 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}