Skip to content

Commit

Permalink
fix ios test
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielEliraz committed Jun 6, 2024
1 parent 6e648d4 commit 0f15d9e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ - (void)setUp {

- (void)testRequestPermissions_userAuthorizedPermissions {
UNAuthorizationOptions authOptions = (UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert);
UNNotificationSettings* settings = [UNNotificationSettings new];
UNNotificationSettings* settings = [UNNotificationSettings alloc];
[settings setValue:@(UNAuthorizationStatusAuthorized) forKey:@"authorizationStatus"];

[[_notificationCenter expect] requestAuthorizationWithOptions:authOptions completionHandler:[OCMArg invokeBlockWithArgs:@(YES), [NSNull null], nil]];
Expand All @@ -48,7 +48,7 @@ - (void)testRequestPermissions_userAuthorizedPermissionsExtraOptions {
UNAuthorizationOptionProvisional |
UNAuthorizationOptionCarPlay);

UNNotificationSettings* settings = [UNNotificationSettings new];
UNNotificationSettings* settings = [UNNotificationSettings alloc];
[settings setValue:@(UNAuthorizationStatusAuthorized) forKey:@"authorizationStatus"];

[[_notificationCenter expect] requestAuthorizationWithOptions:authOptions completionHandler:[OCMArg invokeBlockWithArgs:@(YES), [NSNull null], nil]];
Expand All @@ -65,7 +65,7 @@ - (void)testRequestPermissions_userAuthorizedPermissionsExtraOptions {

- (void)testRequestPermissions_userDeniedPermissions {
UNAuthorizationOptions authOptions = (UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert);
UNNotificationSettings* settings = [UNNotificationSettings new];
UNNotificationSettings* settings = [UNNotificationSettings alloc];
[settings setValue:@(UNAuthorizationStatusDenied) forKey:@"authorizationStatus"];

[[_notificationCenter expect] requestAuthorizationWithOptions:authOptions completionHandler:[OCMArg invokeBlockWithArgs:@(YES), [NSNull null], nil]];
Expand Down

0 comments on commit 0f15d9e

Please sign in to comment.