deferFulfillment all the things (#1306)

This commit is contained in:
David Langley
2023-07-12 18:59:46 +01:00
committed by GitHub
parent af699d9a68
commit 3ff257c075
6 changed files with 101 additions and 82 deletions
@@ -55,8 +55,11 @@ class InvitesScreenViewModelTests: XCTestCase {
return
}
setupViewModel(roomSummaries: invites)
let deferred = deferFulfillment(viewModel.actions.first(), message: "1 action should be published.")
context.send(viewAction: .accept(.init(roomDetails: details, isUnread: false)))
let action: InvitesScreenViewModelAction? = await viewModel.actions.values.first()
let action = try await deferred.fulfill()
guard case .openRoom(let roomID) = action else {
XCTFail("Wrong view model action")
return