An advanced Ethereum/EVM mobile wallet
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
alpha-wallet-ios/TrustTests/ViewControllers/PaymentCoordinator.swift

39 lines
1.2 KiB

// Copyright SIX DAY LLC. All rights reserved.
import XCTest
@testable import Trust
class PaymentCoordinatorTests: XCTestCase {
func testSendFlow() {
let coordinator = PaymentCoordinator(
navigationController: FakeNavigationController(),
flow: .send(destination: .make()),
session: .make()
)
XCTAssertTrue(coordinator.navigationController.viewControllers[0] is SendViewController)
}
func testSendFlowDestination() {
let address: Address = .make()
let coordinator = PaymentCoordinator(
navigationController: FakeNavigationController(),
flow: .send(destination: address),
session: .make()
)
XCTAssertEqual(address.address, coordinator.sendViewController.addressRow?.value)
XCTAssertTrue(coordinator.navigationController.viewControllers[0] is SendViewController)
}
func testRequestFlow() {
let coordinator = PaymentCoordinator(
navigationController: FakeNavigationController(),
flow: .request,
session: .make()
)
XCTAssertTrue(coordinator.navigationController.viewControllers[0] is RequestViewController)
}
}