mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Switch callbacks to combine (#1710)
* #750 - Convert the SoftLogoutScreen to combine * #750 - Convert the UserSessionFlowCoordinator to Combine * #750 - Convert the AnalyticsPromptScreen to Combine * #750 - Convert the LoginScreen to Combine * #750 - Convert the ServerSelectionScreen to Combine * #750 - Convert the EmojiPickerScreen to Combine * #750 - Convert the HomeScreen to Combine * #750 - Convert the MediaUploadPreviewScreen to Combine * #750 - Convert the OnboardingScreen to Combine * Rename `Onboarding` to `OnboardingScreen` * #750 - Convert the ReportContentScreen to Combine * #750 - Convert the RoomDetailsSscreen to Combine * #750 - Convert the RoomMemberDetailsScreen to Combine * #750 - Convert the RoomMembersListScreen to Combine * #750 - Convert the SessionVerificationScreen to Combine * #750 - Convert the SettingsScreen to Combine * #750 - Convert the AdvancedSettingsScreen to Combine * #750 - Convert the DeveloperOptionsScreen to Combine * Fix the unit tests * Use .sink action and the same cancellables constructor everywhere * Cleanup cancellables when setting up tests
This commit is contained in:
@@ -26,9 +26,10 @@ class RoomNotificationSettingsScreenViewModelTests: XCTestCase {
|
||||
var roomProxyMock: RoomProxyMock!
|
||||
var notificationSettingsProxyMock: NotificationSettingsProxyMock!
|
||||
var context: RoomNotificationSettingsScreenViewModelType.Context { viewModel.context }
|
||||
var cancellables: Set<AnyCancellable> = []
|
||||
var cancellables = Set<AnyCancellable>()
|
||||
|
||||
override func setUpWithError() throws {
|
||||
cancellables.removeAll()
|
||||
roomProxyMock = RoomProxyMock(with: .init(displayName: "Test", joinedMembersCount: 0))
|
||||
notificationSettingsProxyMock = NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration())
|
||||
viewModel = RoomNotificationSettingsScreenViewModel(notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
@@ -172,8 +173,8 @@ class RoomNotificationSettingsScreenViewModelTests: XCTestCase {
|
||||
|
||||
var actionSent: RoomNotificationSettingsScreenViewModelAction?
|
||||
viewModel.actions
|
||||
.sink { value in
|
||||
actionSent = value
|
||||
.sink { action in
|
||||
actionSent = action
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
@@ -207,8 +208,8 @@ class RoomNotificationSettingsScreenViewModelTests: XCTestCase {
|
||||
|
||||
var actionSent: RoomNotificationSettingsScreenViewModelAction?
|
||||
viewModel.actions
|
||||
.sink { value in
|
||||
actionSent = value
|
||||
.sink { action in
|
||||
actionSent = action
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user