mirror of
https://github.com/metabolist/metatext.git
synced 2025-01-20 18:18:06 +00:00
24 lines
710 B
Swift
24 lines
710 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import XCTest
|
|
import Combine
|
|
import CombineExpectations
|
|
@testable import Metatext
|
|
|
|
class RootViewModelTests: XCTestCase {
|
|
func testAddIdentity() throws {
|
|
let sut = RootViewModel(environment: .fresh())
|
|
let recorder = sut.$mainNavigationViewModel.record()
|
|
|
|
XCTAssertNil(try wait(for: recorder.next(), timeout: 1))
|
|
|
|
let addIdentityViewModel = sut.addIdentityViewModel()
|
|
|
|
addIdentityViewModel.urlFieldText = "https://mastodon.social"
|
|
addIdentityViewModel.goTapped()
|
|
|
|
let mainNavigationViewModel = try wait(for: recorder.next(), timeout: 1)!
|
|
|
|
XCTAssertNotNil(mainNavigationViewModel)
|
|
}
|
|
}
|