Skip to content

Commit

Permalink
User sessions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paleksandrs committed Dec 23, 2022
1 parent 9ca7f4c commit a777841
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 24 deletions.
36 changes: 30 additions & 6 deletions ElementX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
69BCBB4FB2DC3D61A28D3FD8 /* TimelineStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DC2C9E0E15C79BBDA80F0A2 /* TimelineStyle.swift */; };
6A0E7551E0D1793245F34CDD /* ClientError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D09A267106B9585D3D0CFC0D /* ClientError.swift */; };
6AC1DC1EAD9F7568360DA1BA /* ServerSelectionModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = A30A1758E2B73EF38E7C42F8 /* ServerSelectionModels.swift */; };
6AE7082703DB19F74A83F677 /* SessionVerificationControllerProxyMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDC0DCEE729FCBE315C7445C /* SessionVerificationControllerProxyMock.swift */; };
6B15FF984906AAFCF9DC4F58 /* OnboardingUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C88046D6A070D9827181C4D /* OnboardingUITests.swift */; };
6C67774E8387D44426718BD9 /* FilePreviewCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADB3A7BCE745626EC61EF3C3 /* FilePreviewCoordinator.swift */; };
6C9F6C7F2B35288C4230EF3F /* FilePreviewModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55EA4B03F92F31EAA83B3F7B /* FilePreviewModels.swift */; };
Expand Down Expand Up @@ -253,6 +254,7 @@
8024BE37156FF0A95A7A3465 /* AnalyticsPromptUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF11DD57D9FACF2A757AB024 /* AnalyticsPromptUITests.swift */; };
80D00A7C62AAB44F54725C43 /* PermalinkBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F754E66A8970963B15B2A41E /* PermalinkBuilder.swift */; };
8196A2E71ACC902DD69F24EE /* UserNotificationControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DE6C5C756E1393202BA95CD /* UserNotificationControllerTests.swift */; };
81A7C020CB5F6232242A8414 /* UserSessionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F36C0A6D59717193F49EA986 /* UserSessionTests.swift */; };
829062DD3C3F7016FE1A6476 /* RoomDetailsScreenUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BFDAF6918BB096C44788FC9 /* RoomDetailsScreenUITests.swift */; };
83E5054739949181CA981193 /* LoginCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD667C4BB98CF4F3FE2CE3B0 /* LoginCoordinator.swift */; };
85AFBB433AD56704A880F8A0 /* FramePreferenceKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4798B3B7A1E8AE3901CEE8C6 /* FramePreferenceKey.swift */; };
Expand Down Expand Up @@ -339,7 +341,6 @@
ABF3FAB234AD3565B214309B /* TimelineSenderAvatarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC588051E6572A1AF51D738 /* TimelineSenderAvatarView.swift */; };
AC5CC8250CEAE57B73900C57 /* UserNotificationModalView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD80F22830C2360F3F39DDCE /* UserNotificationModalView.swift */; };
AC69B6DF15FC451AB2945036 /* UserSessionStoreProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBA759D1347CFFB3D84ED1F /* UserSessionStoreProtocol.swift */; };
ACAB49022C2EBD00AFC67729 /* ClientProxySpy.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1924EF73801E03610E0F2AB /* ClientProxySpy.swift */; };
ACF094CF3BF02DBFA6DFDE60 /* AuthenticationCoordinatorUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D2D0A6F1ABC99D29462FB84 /* AuthenticationCoordinatorUITests.swift */; };
AD2A81B65A9F6163012086F1 /* MXLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 111B698739E3410E2CDB7144 /* MXLog.swift */; };
AEE3981A0F090208E4445808 /* MockNotificationServiceProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B37DCC9025452F46F91340E /* MockNotificationServiceProxy.swift */; };
Expand Down Expand Up @@ -372,6 +373,7 @@
BD782053BE4C3D2F0BDE5699 /* ServiceLocator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F95CADD0A5DBD76B990FCB /* ServiceLocator.swift */; };
BEEEB659A0BA510D7BE6345C /* RoomMemberProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D1790942BE4FE0D8273191B /* RoomMemberProxy.swift */; };
BFB534E338A3D949944FB2F5 /* NotificationServiceProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B490675B8E31423AF116BDA /* NotificationServiceProxy.swift */; };
C07B25B7F552657C158DA85B /* ClientProxyMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5461F0B817787C9694D9620A /* ClientProxyMock.swift */; };
C1910A16BDF131FECA77BE22 /* EmojiPickerScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEA38B9851CFCC4D67F5587D /* EmojiPickerScreenCoordinator.swift */; };
C3522917C0C367C403429EEC /* CoordinatorProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = B251F5B4511D1CA0BA8361FE /* CoordinatorProtocol.swift */; };
C35CF4DAB1467FE1BBDC204B /* MessageTimelineItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEAF1C75771D9DC75877F4B4 /* MessageTimelineItem.swift */; };
Expand Down Expand Up @@ -708,7 +710,7 @@
541542F5AC323709D8563458 /* AnalyticsPrompt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPrompt.swift; sourceTree = "<group>"; };
542D4F49FABA056DEEEB3400 /* RustTracing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RustTracing.swift; sourceTree = "<group>"; };
5445FCE0CE15E634FDC1A2E2 /* AnalyticsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsService.swift; sourceTree = "<group>"; };
551DAED7F623AA5366E79927 /* repository */ = {isa = PBXFileReference; lastKnownFileType = folder; name = repository; path = .; sourceTree = SOURCE_ROOT; };
5461F0B817787C9694D9620A /* ClientProxyMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientProxyMock.swift; sourceTree = "<group>"; };
55BC11560C8A2598964FFA4C /* bs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bs; path = bs.lproj/Localizable.strings; sourceTree = "<group>"; };
55D7187F6B0C0A651AC3DFFA /* in */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = in; path = in.lproj/Localizable.strings; sourceTree = "<group>"; };
55EA4B03F92F31EAA83B3F7B /* FilePreviewModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilePreviewModels.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -953,6 +955,7 @@
D1A9CCCF53495CF3D7B19FCE /* MockSessionVerificationControllerProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockSessionVerificationControllerProxy.swift; sourceTree = "<group>"; };
D263254AFE5B7993FFBBF324 /* NSE.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NSE.entitlements; sourceTree = "<group>"; };
D2D783758EAE6A88C93564EB /* VideoPlayerViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoPlayerViewModel.swift; sourceTree = "<group>"; };
D31DC8105C6233E5FFD9B84C /* element-x-ios */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "element-x-ios"; path = .; sourceTree = SOURCE_ROOT; };
D33116993D54FADC0C721C1F /* Application.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = "<group>"; };
D3D455BC2423D911A62ACFB2 /* NSELogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSELogger.swift; sourceTree = "<group>"; };
D4DA544B2520BFA65D6DB4BB /* target.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = target.yml; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1008,6 +1011,7 @@
ED482057AE39D5C6D9C5F3D8 /* message.caf */ = {isa = PBXFileReference; path = message.caf; sourceTree = "<group>"; };
EDAA4472821985BF868CC21C /* ServerSelectionViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewModelTests.swift; sourceTree = "<group>"; };
EDB6E40BAD4504D899FAAC9A /* TemplateViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateViewModel.swift; sourceTree = "<group>"; };
EDC0DCEE729FCBE315C7445C /* SessionVerificationControllerProxyMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionVerificationControllerProxyMock.swift; sourceTree = "<group>"; };
EE8BCD14EFED23459A43FDFF /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
EEAF1C75771D9DC75877F4B4 /* MessageTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageTimelineItem.swift; sourceTree = "<group>"; };
EEE384418EB1FEDFA62C9CD0 /* RoomTimelineViewFactoryProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineViewFactoryProtocol.swift; sourceTree = "<group>"; };
Expand All @@ -1020,12 +1024,12 @@
F118CF7C5548099AACF7E90C /* RoomMembersCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomMembersCoordinator.swift; sourceTree = "<group>"; };
F15BE37BE2FB86E00C8D150A /* AggregratedReaction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AggregratedReaction.swift; sourceTree = "<group>"; };
F174A5627CDB3CAF280D1880 /* EmojiPickerScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenModels.swift; sourceTree = "<group>"; };
F1924EF73801E03610E0F2AB /* ClientProxySpy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientProxySpy.swift; sourceTree = "<group>"; };
F23BA6D4842D53C5AC9B7584 /* nn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = nn; path = nn.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
F2D58333B377888012740101 /* LoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModel.swift; sourceTree = "<group>"; };
F31A4E5941ACBA4BB9FEF94C /* UserNotificationToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNotificationToastView.swift; sourceTree = "<group>"; };
F31F59030205A6F65B057E1A /* MatrixEntityRegexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MatrixEntityRegexTests.swift; sourceTree = "<group>"; };
F3648F2FADEF2672D6A0D489 /* FileCacheTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileCacheTests.swift; sourceTree = "<group>"; };
F36C0A6D59717193F49EA986 /* UserSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionTests.swift; sourceTree = "<group>"; };
F3EAE3E9D5EF4A6D5D9C6CFD /* EmojiPickerScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenViewModel.swift; sourceTree = "<group>"; };
F506C6ADB1E1DA6638078E11 /* UITests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
F5C4AF6E3885730CD560311C /* ScreenshotDetector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenshotDetector.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1510,6 +1514,15 @@
path = Scripts;
sourceTree = "<group>";
};
53280D2292E6C9C7821773FD /* UserSession */ = {
isa = PBXGroup;
children = (
EDC0DCEE729FCBE315C7445C /* SessionVerificationControllerProxyMock.swift */,
F36C0A6D59717193F49EA986 /* UserSessionTests.swift */,
);
path = UserSession;
sourceTree = "<group>";
};
5329E48968EB951235E83DAE /* SessionVerification */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1709,6 +1722,7 @@
EB3B237387B8288A5A938F1B /* UserAgentBuilderTests.swift */,
0DE6C5C756E1393202BA95CD /* UserNotificationControllerTests.swift */,
A3004DFA1B10951962787D90 /* VideoPlayerViewModelTests.swift */,
53280D2292E6C9C7821773FD /* UserSession */,
7DBC911559934065993A5FF4 /* NotificationManager */,
);
path = Sources;
Expand Down Expand Up @@ -1821,7 +1835,7 @@
7DBC911559934065993A5FF4 /* NotificationManager */ = {
isa = PBXGroup;
children = (
F1924EF73801E03610E0F2AB /* ClientProxySpy.swift */,
5461F0B817787C9694D9620A /* ClientProxyMock.swift */,
0376C429FAB1687C3D905F3E /* MockCoder.swift */,
30ED584467DB380E3CEFB1DB /* NotificationManagerTests.swift */,
DC0AEA686E425F86F6BA0404 /* UNNotification+Creator.swift */,
Expand Down Expand Up @@ -1937,7 +1951,7 @@
9413F680ECDFB2B0DDB0DEF2 /* Packages */ = {
isa = PBXGroup;
children = (
551DAED7F623AA5366E79927 /* repository */,
D31DC8105C6233E5FFD9B84C /* element-x-ios */,
);
name = Packages;
sourceTree = SOURCE_ROOT;
Expand Down Expand Up @@ -2300,6 +2314,7 @@
4009BE2E791C16AC6EE39A7E /* BugReport */,
F5A65D1D3B83593598DC278D /* EmojiPickerScreen */,
B442FCF47E0A6F28D7D50A4D /* FilePreview */,
FC26FB522EDED4965C5325F0 /* Folder */,
B53CA9BECD3F97805E1432D0 /* HomeScreen */,
3F38EAC92E2281990E65DAF2 /* OnboardingScreen */,
A448A3A8F764174C60CD0CA1 /* Other */,
Expand Down Expand Up @@ -2383,6 +2398,13 @@
path = EmojiPickerScreen;
sourceTree = "<group>";
};
FC26FB522EDED4965C5325F0 /* Folder */ = {
isa = PBXGroup;
children = (
);
path = Folder;
sourceTree = "<group>";
};
FCDF06BDB123505F0334B4F9 /* Timeline */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -2851,7 +2873,7 @@
0F9E38A75337D0146652ACAB /* BackgroundTaskTests.swift in Sources */,
7F61F9ACD5EC9E845EF3EFBF /* BugReportServiceTests.swift in Sources */,
C7CFDB4929DDD9A3B5BA085D /* BugReportViewModelTests.swift in Sources */,
ACAB49022C2EBD00AFC67729 /* ClientProxySpy.swift in Sources */,
C07B25B7F552657C158DA85B /* ClientProxyMock.swift in Sources */,
9C45CE85325CD591DADBC4CA /* ElementXTests.swift in Sources */,
501304F26B52DF7024011B6C /* EmojiMartJSONLoaderTests.swift in Sources */,
25618589E0DE0F1E95FC7B5C /* EmojiProviderTests.swift in Sources */,
Expand All @@ -2876,6 +2898,7 @@
46562110EE202E580A5FFD9C /* RoomScreenViewModelTests.swift in Sources */,
EA31DD9043B91ECB8E45A9A6 /* ScreenshotDetectorTests.swift in Sources */,
93875ADD456142D20823ED24 /* ServerSelectionViewModelTests.swift in Sources */,
6AE7082703DB19F74A83F677 /* SessionVerificationControllerProxyMock.swift in Sources */,
86675910612A12409262DFBD /* SessionVerificationStateMachineTests.swift in Sources */,
755727E0B756430DFFEC4732 /* SessionVerificationViewModelTests.swift in Sources */,
206F0DBAB6AF042CA1FF2C0D /* SettingsViewModelTests.swift in Sources */,
Expand All @@ -2888,6 +2911,7 @@
8D3E1FADD78E72504DE0E402 /* UserAgentBuilderTests.swift in Sources */,
08248D02BACA75CDC3B39A96 /* UserNotificationCenterSpy.swift in Sources */,
8196A2E71ACC902DD69F24EE /* UserNotificationControllerTests.swift in Sources */,
81A7C020CB5F6232242A8414 /* UserSessionTests.swift in Sources */,
1504CE9A609A348D90B69E47 /* VideoPlayerViewModelTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import Combine
@testable import ElementX
import Foundation

class ClientProxySpy: ClientProxyProtocol {
class ClientProxyMock: ClientProxyProtocol {
var sessionVerificationControllerProxyResult: Result<ElementX.SessionVerificationControllerProxyProtocol, ClientProxyError>?

var visibleRoomsSummaryProvider: ElementX.RoomSummaryProviderProtocol?

var allRoomsSummaryProvider: ElementX.RoomSummaryProviderProtocol?
Expand Down Expand Up @@ -64,9 +66,13 @@ class ClientProxySpy: ClientProxyProtocol {
func setAccountData<Content>(content: Content, type: String) async -> Result<Void, ClientProxyError> where Content: Encodable {
.failure(.failedLoadingMedia)
}

func sessionVerificationControllerProxy() async -> Result<ElementX.SessionVerificationControllerProxyProtocol, ClientProxyError> {
.failure(.failedLoadingMedia)
if let sessionVerificationControllerProxyResult {
return sessionVerificationControllerProxyResult
} else {
return .failure(.failedLoadingMedia)
}
}

func logout() async { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Combine

final class NotificationManagerTests: XCTestCase {
var sut: NotificationManager!
private let clientProxySpy = ClientProxySpy()
private let clientProxyMock = ClientProxyMock()
private let notificationCenter = UserNotificationCenterSpy()
private var authorizationStatusWasGranted = false
private var shouldDisplayInAppNotificationReturnValue = false
Expand All @@ -30,7 +30,7 @@ final class NotificationManagerTests: XCTestCase {
private let settings = ServiceLocator.shared.settings

override func setUp() {
sut = NotificationManager(clientProxy: clientProxySpy, notificationCenter: notificationCenter)
sut = NotificationManager(clientProxy: clientProxyMock, notificationCenter: notificationCenter)
}

func test_whenRegistered_pusherIsCalled() throws {
Expand All @@ -39,7 +39,7 @@ final class NotificationManagerTests: XCTestCase {
expectation.fulfill()
})
waitForExpectations(timeout: 0.5)
XCTAssertTrue(clientProxySpy.setPusherCalled)
XCTAssertTrue(clientProxyMock.setPusherCalled)
}

func test_whenRegisteredSuccess_completionSuccessIsCalled() throws {
Expand All @@ -59,7 +59,7 @@ final class NotificationManagerTests: XCTestCase {
enum TestError: Error {
case someError
}
clientProxySpy.setPusherErrorToThrow = TestError.someError
clientProxyMock.setPusherErrorToThrow = TestError.someError
sut.register(with: Data(), completion: { s in
success = s
expectation.fulfill()
Expand All @@ -75,16 +75,16 @@ final class NotificationManagerTests: XCTestCase {
expectation.fulfill()
})
waitForExpectations(timeout: 0.5)
XCTAssertEqual(clientProxySpy.setPusherPushkey, pushkeyData.base64EncodedString())
XCTAssertEqual(clientProxySpy.setPusherAppId, settings?.pusherAppId)
XCTAssertEqual(clientProxySpy.setPusherKind, .http)
XCTAssertEqual(clientProxySpy.setPusherAppId, settings?.pusherAppId)
XCTAssertEqual(clientProxySpy.setPusherAppDisplayName, "\(InfoPlistReader.target.bundleDisplayName) (iOS)")
XCTAssertEqual(clientProxySpy.setPusherDeviceDisplayName, UIDevice.current.name)
XCTAssertNotNil(clientProxySpy.setPusherProfileTag)
XCTAssertEqual(clientProxySpy.setPusherLang, Bundle.preferredLanguages.first)
XCTAssertEqual(clientProxySpy.setPusherUrl, settings?.pushGatewayBaseURL.absoluteString)
XCTAssertEqual(clientProxySpy.setPusherFormat, .eventIdOnly)
XCTAssertEqual(clientProxyMock.setPusherPushkey, pushkeyData.base64EncodedString())
XCTAssertEqual(clientProxyMock.setPusherAppId, settings?.pusherAppId)
XCTAssertEqual(clientProxyMock.setPusherKind, .http)
XCTAssertEqual(clientProxyMock.setPusherAppId, settings?.pusherAppId)
XCTAssertEqual(clientProxyMock.setPusherAppDisplayName, "\(InfoPlistReader.target.bundleDisplayName) (iOS)")
XCTAssertEqual(clientProxyMock.setPusherDeviceDisplayName, UIDevice.current.name)
XCTAssertNotNil(clientProxyMock.setPusherProfileTag)
XCTAssertEqual(clientProxyMock.setPusherLang, Bundle.preferredLanguages.first)
XCTAssertEqual(clientProxyMock.setPusherUrl, settings?.pushGatewayBaseURL.absoluteString)
XCTAssertEqual(clientProxyMock.setPusherFormat, .eventIdOnly)
let defaultPayload: [AnyHashable: Any] = [
"aps": [
"mutable-content": 1,
Expand All @@ -94,7 +94,7 @@ final class NotificationManagerTests: XCTestCase {
]
]
]
let actualPayload = NSDictionary(dictionary: clientProxySpy.setPusherDefaultPayload ?? [:])
let actualPayload = NSDictionary(dictionary: clientProxyMock.setPusherDefaultPayload ?? [:])
XCTAssertTrue(actualPayload.isEqual(to: defaultPayload))
}

Expand Down
Loading

0 comments on commit a777841

Please sign in to comment.