mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Tidy up mock creation. (#5627)
* Use our standard XYZMock(.init()) pattern everywhere instead of XYZMock.default. * Remove the configuration parameter label on mock convenience inits. * Update the enterprise submodule.
This commit is contained in:
@@ -27,7 +27,7 @@ struct StartChatScreenViewModelTests {
|
||||
userDiscoveryService.searchProfilesWithReturnValue = .success([])
|
||||
let userSession = UserSessionMock(.init(clientProxy: clientProxy))
|
||||
viewModel = StartChatScreenViewModel(userSession: userSession,
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
analytics: AnalyticsServiceMock(.init()),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
userDiscoveryService: userDiscoveryService,
|
||||
appSettings: appSettings)
|
||||
@@ -92,7 +92,7 @@ struct StartChatScreenViewModelTests {
|
||||
@Test
|
||||
func inviteConfirmationFetchesIdentity() async throws {
|
||||
clientProxy.directRoomForUserIDReturnValue = .success(nil)
|
||||
clientProxy.userIdentityForFallBackToServerReturnValue = .success(UserIdentityProxyMock(configuration: .init(verificationState: .notVerified)))
|
||||
clientProxy.userIdentityForFallBackToServerReturnValue = .success(UserIdentityProxyMock(.init(verificationState: .notVerified)))
|
||||
|
||||
// User identity becomes known, i.e. not unknown
|
||||
let deferred = deferFulfillment(viewModel.context.$viewState.compactMap(\.bindings.selectedUserToInvite)) {
|
||||
|
||||
Reference in New Issue
Block a user