Last active
December 12, 2018 23:49
-
-
Save eyeezzi/dbe1e75d7fe9025e358d42a5b80505c2 to your computer and use it in GitHub Desktop.
Testing View Controllers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@testable import Shopify_POS | |
class CustomerDetailsViewControllerTests: PointOfSaleTests { | |
func testDetailsOfflineDisablesEdit() { | |
let customerDataProvider = CustomersDataProvider.Mock() | |
let customerDetails = CustomerDetailsViewController(account: account, customer: createCustomer(), /*...*/ reachability: ReachabilityMock(with: .none)) | |
let navigationController = UINavigationController(rootViewController: customerDetails) | |
navigationController.view.resize(to: .modal) | |
verify(navigationController, delay: 1.0) | |
} | |
func testDetailsWithActions() { | |
let customerDetails = CustomerDetailsViewController(account: account, customer: createCustomer(), /*...*/) | |
let navigationController = UINavigationController(rootViewController: customerDetails) | |
navigationController.view.resize(to: .modal) | |
verify(navigationController, delay: 1.0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment