krz/hutch

an ios client for sourcehut

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

v2.5.1: HutchTests/AppStateTests.swift · raw

 1import Testing
 2@testable import Hutch
 3
 4struct AppStateTests {
 5
 6    @Test
 7    @MainActor
 8    func presentRepositoryDeepLinkErrorSetsUserFacingMessage() {
 9        let appState = AppState()
10
11        appState.presentRepositoryDeepLinkError()
12
13        #expect(appState.deepLinkError == "The repository could not be found or is inaccessible.")
14    }
15
16    @Test
17    @MainActor
18    func presentTicketDeepLinkErrorSetsUserFacingMessage() {
19        let appState = AppState()
20
21        appState.presentTicketDeepLinkError()
22
23        #expect(appState.deepLinkError == "The ticket could not be found or is inaccessible.")
24    }
25}