mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
deferFulfillment all the things (#1306)
This commit is contained in:
@@ -91,12 +91,14 @@ class RoomDetailsEditScreenViewModelTests: XCTestCase {
|
||||
XCTAssertTrue(context.showMediaSheet)
|
||||
}
|
||||
|
||||
func testSaveTriggersViewModelAction() async {
|
||||
func testSaveTriggersViewModelAction() async throws {
|
||||
setupViewModel(accountOwner: .mockOwner(allowedStateEvents: [.roomAvatar, .roomName, .roomTopic]),
|
||||
roomProxyConfiguration: .init(name: "Some room", displayName: "Some room"))
|
||||
|
||||
let deferred = deferFulfillment(viewModel.actions.first())
|
||||
context.name = "name"
|
||||
context.send(viewAction: .save)
|
||||
let action = await viewModel.actions.values.first()
|
||||
let action = try await deferred.fulfill()
|
||||
XCTAssertEqual(action, .saveFinished)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user