send .fullyRead marker when leaving the room
This commit is contained in:
@@ -248,6 +248,28 @@ class RoomScreenViewModelTests: XCTestCase {
|
||||
XCTAssertTrue(viewModel.state.shouldShowCallButton)
|
||||
}
|
||||
|
||||
func testRoomFullyRead() async {
|
||||
let expectation = XCTestExpectation(description: "Wait for fully read")
|
||||
let roomProxyMock = JoinedRoomProxyMock(.init(id: "MyRoomID"))
|
||||
roomProxyMock.markAsReadReceiptTypeClosure = { readReceiptType in
|
||||
XCTAssertEqual(readReceiptType, .fullyRead)
|
||||
expectation.fulfill()
|
||||
return .success(())
|
||||
}
|
||||
let viewModel = RoomScreenViewModel(clientProxy: ClientProxyMock(),
|
||||
roomProxy: roomProxyMock,
|
||||
initialSelectedPinnedEventID: nil,
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
analyticsService: ServiceLocator.shared.analytics,
|
||||
userIndicatorController: ServiceLocator.shared.userIndicatorController)
|
||||
self.viewModel = viewModel
|
||||
viewModel.stop()
|
||||
await fulfillment(of: [expectation])
|
||||
}
|
||||
|
||||
// MARK: - Knock Requests
|
||||
|
||||
func testKnockRequestBanner() async throws {
|
||||
|
||||
Reference in New Issue
Block a user