mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Make AnalyticsService mockable via `AnalyticsServiceProtocol (#5599)
* Create AnalyticsServiceProtocol and conform AnalyticsService * Replace AnalyticsService properties and arguments with AnalyticsServiceProtocol * Inline AnalyticsServiceMock replacing old mock * handle more complex AnalyticsServiceMock callsites * move documentation from AnalyticsService to AnalyticsServiceProtocol
This commit is contained in:
@@ -206,16 +206,13 @@ struct RoomMemberDetailsViewModelTests {
|
||||
.success(roomMemberProxyMock)
|
||||
}
|
||||
|
||||
let appSettings = AppSettings()
|
||||
let analytics = AnalyticsService.mock(settings: appSettings)
|
||||
|
||||
// swiftlint:disable:next force_unwrapping
|
||||
let userSession = clientProxy != nil ? UserSessionMock(.init(clientProxy: clientProxy!)) : UserSessionMock(.init())
|
||||
viewModel = RoomMemberDetailsScreenViewModel(userID: roomMemberProxyMock.userID,
|
||||
roomProxy: roomProxyMock,
|
||||
userSession: userSession,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
analytics: analytics,
|
||||
appSettings: appSettings)
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
appSettings: AppSettings())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user