mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Rename UserProfileProxy to UserProfile. It's a pure struct and proxies nothing.
Also remove the redundant `userID` property given `id` already exists (for Identifiable conformance).
This commit is contained in:
@@ -15,11 +15,11 @@ struct UserProfileScreenViewModelTests {
|
||||
func initialState() async throws {
|
||||
let userIndicatorController = UserIndicatorControllerMock()
|
||||
|
||||
let profile = UserProfileProxy(userID: "@alice:matrix.org", displayName: "Alice", avatarURL: .mockMXCAvatar)
|
||||
let profile = UserProfile(userID: "@alice:matrix.org", displayName: "Alice", avatarURL: .mockMXCAvatar)
|
||||
let clientProxy = ClientProxyMock(.init())
|
||||
clientProxy.profileForReturnValue = .success(profile)
|
||||
|
||||
let viewModel = UserProfileScreenViewModel(userID: profile.userID,
|
||||
let viewModel = UserProfileScreenViewModel(userID: profile.id,
|
||||
isPresentedModally: false,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
userIndicatorController: userIndicatorController,
|
||||
@@ -39,11 +39,11 @@ struct UserProfileScreenViewModelTests {
|
||||
func initialStateAccountOwner() async throws {
|
||||
let userIndicatorController = UserIndicatorControllerMock()
|
||||
|
||||
let profile = UserProfileProxy(userID: RoomMemberProxyMock.mockMe.userID, displayName: "Me", avatarURL: .mockMXCAvatar)
|
||||
let profile = UserProfile(userID: RoomMemberProxyMock.mockMe.userID, displayName: "Me", avatarURL: .mockMXCAvatar)
|
||||
let clientProxy = ClientProxyMock(.init())
|
||||
clientProxy.profileForReturnValue = .success(profile)
|
||||
|
||||
let viewModel = UserProfileScreenViewModel(userID: profile.userID,
|
||||
let viewModel = UserProfileScreenViewModel(userID: profile.id,
|
||||
isPresentedModally: false,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
userIndicatorController: userIndicatorController,
|
||||
@@ -63,13 +63,13 @@ struct UserProfileScreenViewModelTests {
|
||||
func startingDmWithUnknownUserFetchesIdentity() async throws {
|
||||
let userIndicatorController = UserIndicatorControllerMock()
|
||||
|
||||
let profile = UserProfileProxy.mockAlice
|
||||
let profile = UserProfile.mockAlice
|
||||
|
||||
let clientProxy = ClientProxyMock(.init())
|
||||
clientProxy.directRoomForUserIDReturnValue = .success(nil)
|
||||
clientProxy.userIdentityForFallBackToServerReturnValue = .success(nil)
|
||||
|
||||
let viewModel = UserProfileScreenViewModel(userID: profile.userID,
|
||||
let viewModel = UserProfileScreenViewModel(userID: profile.id,
|
||||
isPresentedModally: false,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
userIndicatorController: userIndicatorController,
|
||||
|
||||
Reference in New Issue
Block a user