summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlapinskijw <jlapinski.dev@gmail.com>2020-06-29 10:14:12 -0400
committerlapinskijw <jlapinski.dev@gmail.com>2020-06-29 10:14:12 -0400
commit36f0399b965f1d9b6509d2289c6e6296435aa698 (patch)
tree03b8be9358c3f1d1bd492e7edafc19f74513fd41
parent239c7032ea3a2c648d9193e21ccfa40198d729ed (diff)
downloadsdl_ios-36f0399b965f1d9b6509d2289c6e6296435aa698.tar.gz
updated tests for filter spec and manager spec
-rw-r--r--SmartDeviceLink/SDLPermissionFilter.m2
-rw-r--r--SmartDeviceLink/SDLPermissionManager.h2
-rw-r--r--SmartDeviceLink/SDLPermissionManager.m6
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m76
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m66
5 files changed, 76 insertions, 76 deletions
diff --git a/SmartDeviceLink/SDLPermissionFilter.m b/SmartDeviceLink/SDLPermissionFilter.m
index 4221ea749..7fee1a7f2 100644
--- a/SmartDeviceLink/SDLPermissionFilter.m
+++ b/SmartDeviceLink/SDLPermissionFilter.m
@@ -82,7 +82,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSArray<SDLPermissionRPCName> *)getRPCNamesFromPermissionElements:(NSArray<SDLPermissionElement *> *)permissionElements {
NSMutableArray *rpcNames = [NSMutableArray new];
for (SDLPermissionElement *element in permissionElements) {
- [rpcNames addObject:element];
+ [rpcNames addObject:element.rpcName];
}
return rpcNames;
diff --git a/SmartDeviceLink/SDLPermissionManager.h b/SmartDeviceLink/SDLPermissionManager.h
index 5639867bf..68cc91084 100644
--- a/SmartDeviceLink/SDLPermissionManager.h
+++ b/SmartDeviceLink/SDLPermissionManager.h
@@ -117,7 +117,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @return An identifier that can be passed to removeObserverForIdentifer: to remove the observer
*/
-- (SDLPermissionObserverIdentifier)subscribeToRPCNames:(NSArray<SDLPermissionElement *> *)rpcNames groupType:(SDLPermissionGroupType)groupType withHandler:(SDLPermissionElementsChangedHandler)handler;
+- (SDLPermissionObserverIdentifier)subscribeToRPCNames:(NSArray<SDLPermissionElement *> *)rpcNames groupType:(SDLPermissionGroupType)groupType withHandler:(SDLPermissionsChangedHandler)handler;
/**
* Remove every current observer
diff --git a/SmartDeviceLink/SDLPermissionManager.m b/SmartDeviceLink/SDLPermissionManager.m
index c1826f460..57753618f 100644
--- a/SmartDeviceLink/SDLPermissionManager.m
+++ b/SmartDeviceLink/SDLPermissionManager.m
@@ -138,7 +138,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSDictionary<SDLRPCFunctionName, NSNumber *> *)statusesOfRPCNames:(NSArray<SDLPermissionElement *> *)rpcNames {
NSMutableDictionary<SDLRPCFunctionName, NSNumber *> *permissionAllowedDict = [NSMutableDictionary dictionary];
-
+
for (SDLPermissionElement *permissionElement in rpcNames) {
permissionAllowedDict[permissionElement.rpcName] = @([self isRPCNameAllowed:permissionElement.rpcName]);
}
@@ -163,7 +163,7 @@ NS_ASSUME_NONNULL_BEGIN
return filter.identifier;
}
-- (SDLPermissionObserverIdentifier)subscribeToRPCNames:(NSArray<SDLPermissionElement *> *)rpcNames groupType:(SDLPermissionGroupType)groupType withHandler:(SDLPermissionElementsChangedHandler)handler {
+- (SDLPermissionObserverIdentifier)subscribeToRPCNames:(NSArray<SDLPermissionElement *> *)rpcNames groupType:(SDLPermissionGroupType)groupType withHandler:(SDLPermissionsChangedHandler)handler {
SDLPermissionFilter *filter = [SDLPermissionFilter filterWithRPCNames:rpcNames groupType:groupType observer:handler];
// Store the filter for later use
@@ -262,7 +262,7 @@ NS_ASSUME_NONNULL_BEGIN
if (hmiStatus.windowID != nil && hmiStatus.windowID.integerValue != SDLPredefinedWindowsDefaultWindow) {
return;
}
-
+
SDLHMILevel oldHMILevel = [self.currentHMILevel copy];
self.currentHMILevel = hmiStatus.hmiLevel;
NSArray<SDLPermissionFilter *> *filters = [self.filters copy];
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m
index 80dac5c6e..9e9f3328b 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m
@@ -12,143 +12,143 @@ describe(@"A filter", ^{
__block NSString *testRPCName2 = nil;
__block SDLPermissionElement *testPermissionElement1 = nil;
__block SDLPermissionElement *testPermissionElement2 = nil;
-
+
beforeEach(^{
testRPCName1 = @"testRPCName1";
testRPCName2 = @"testRPCName2";
testPermissionElement1 = [[SDLPermissionElement alloc] initWithRPCName:testRPCName1 parameterPermissions:nil];
testPermissionElement2 = [[SDLPermissionElement alloc] initWithRPCName:testRPCName2 parameterPermissions:nil];
});
-
+
describe(@"should initialize correctly", ^{
__block NSArray<SDLPermissionElement *> *testPermissionElements = nil;
__block SDLPermissionGroupType testGroupType = SDLPermissionGroupTypeAny;
__block SDLPermissionFilter *testFilter = nil;
-
- __block NSDictionary<SDLPermissionElement *, NSNumber<SDLBool> *> *testObserverReturnChangedDict = nil;
-
+
+ __block NSDictionary<SDLPermissionRPCName, NSNumber<SDLBool> *> *testObserverReturnChangedDict = nil;
+
beforeEach(^{
testPermissionElements = @[testPermissionElement1, testPermissionElement2];
testGroupType = SDLPermissionGroupTypeAny;
});
-
+
context(@"using initWithRPCNames:changeType:observer:", ^{
beforeEach(^{
- testFilter = [[SDLPermissionFilter alloc] initWithRPCNames:testPermissionElements groupType:testGroupType observer:^(NSDictionary<SDLPermissionElement *,NSNumber<SDLBool> *> * _Nonnull changedDict, SDLPermissionGroupStatus status) {
+ testFilter = [[SDLPermissionFilter alloc] initWithRPCNames:testPermissionElements groupType:testGroupType observer:^(NSDictionary<SDLPermissionRPCName, NSNumber<SDLBool> *> * _Nonnull changedDict, SDLPermissionGroupStatus status) {
testObserverReturnChangedDict = changedDict;
}];
});
-
+
it(@"should set the rpcNames array correctly", ^{
expect(testFilter.permissionElements).to(equal(testPermissionElements));
});
-
+
describe(@"it should set up the observer correctly", ^{
- __block NSDictionary<SDLPermissionElement*,NSNumber<SDLBool> *> *testObserverChangedDict = nil;
+ __block NSDictionary<SDLPermissionRPCName,NSNumber<SDLBool> *> *testObserverChangedDict = nil;
__block NSNumber<SDLBool> *testRPCName1Bool = nil;
__block NSNumber<SDLBool> *testRPCName2Bool = nil;
__block SDLPermissionGroupStatus testObserverGroupStatus = SDLPermissionGroupStatusUnknown;
-
+
beforeEach(^{
testRPCName1Bool = @YES;
testRPCName2Bool = @NO;
- testObserverChangedDict = @{testPermissionElement1: testRPCName1Bool,
- testPermissionElement2: testRPCName2Bool};
+ testObserverChangedDict = @{testRPCName1: testRPCName1Bool,
+ testRPCName2: testRPCName2Bool};
testObserverGroupStatus = SDLPermissionGroupStatusMixed;
-
+
testFilter.handler(testObserverChangedDict, testObserverGroupStatus);
});
-
+
it(@"should call the changedDict correctly", ^{
expect(testObserverReturnChangedDict).to(equal(testObserverChangedDict));
});
-
+
it(@"should call the status correctly", ^{
expect(@(testObserverGroupStatus)).to(equal(@(testObserverGroupStatus)));
});
});
});
-
+
context(@"using filterWithRPCNames:changeType:observer:", ^{
beforeEach(^{
- testFilter = [SDLPermissionFilter filterWithRPCNames:testPermissionElements groupType:testGroupType observer:^(NSDictionary<SDLPermissionElement *,NSNumber<SDLBool> *> * _Nonnull changedDict, SDLPermissionGroupStatus status) {
+ testFilter = [SDLPermissionFilter filterWithRPCNames:testPermissionElements groupType:testGroupType observer:^(NSDictionary<SDLPermissionRPCName, NSNumber<SDLBool> *> * _Nonnull changedDict, SDLPermissionGroupStatus status) {
testObserverReturnChangedDict = changedDict;
}];
});
-
+
it(@"should set the rpcNames array correctly", ^{
expect(testFilter.permissionElements).to(equal(testPermissionElements));
});
-
+
describe(@"it should set up the observer correctly", ^{
- __block NSDictionary<SDLPermissionElement*,NSNumber<SDLBool> *> *testObserverChangedDict = nil;
+ __block NSDictionary<SDLPermissionRPCName, NSNumber<SDLBool> *> *testObserverChangedDict = nil;
__block NSNumber<SDLBool> *testRPCName1Bool = nil;
__block NSNumber<SDLBool> *testRPCName2Bool = nil;
__block SDLPermissionGroupStatus testObserverGroupStatus = SDLPermissionGroupStatusUnknown;
-
+
beforeEach(^{
testRPCName1Bool = @YES;
testRPCName2Bool = @NO;
- testObserverChangedDict = @{testPermissionElement1: testRPCName1Bool,
- testPermissionElement2: testRPCName2Bool};
+ testObserverChangedDict = @{testRPCName1: testRPCName1Bool,
+ testRPCName2: testRPCName2Bool};
testObserverGroupStatus = SDLPermissionGroupStatusMixed;
-
+
testFilter.handler(testObserverChangedDict, testObserverGroupStatus);
});
-
+
it(@"should call the changedDict correctly", ^{
expect(testObserverReturnChangedDict).to(equal(testObserverChangedDict));
});
-
+
it(@"should call the status correctly", ^{
expect(@(testObserverGroupStatus)).to(equal(@(testObserverGroupStatus)));
});
});
});
});
-
+
describe(@"copying a filter", ^{
__block SDLPermissionFilter *testFilter = nil;
__block SDLPermissionFilter *testCopiedFilter = nil;
-
+
beforeEach(^{
testFilter = [SDLPermissionFilter filterWithRPCNames:@[testPermissionElement1] groupType:SDLPermissionGroupTypeAny observer:^(NSDictionary<SDLPermissionElement *,NSNumber<SDLBool> *> * _Nonnull changedDict, SDLPermissionGroupStatus status) {}];
testCopiedFilter = [testFilter copy];
});
-
+
it(@"should say copied filters are not the same instance", ^{
expect(testCopiedFilter).toNot(beIdenticalTo(testFilter));
});
-
+
it(@"should copy the identifier correctly", ^{
expect(testCopiedFilter.identifier).to(equal(testFilter.identifier));
});
-
+
it(@"should copy the filter array correctly", ^{
expect(testCopiedFilter.permissionElements).to(equal(testFilter.permissionElements));
});
-
+
it(@"should copy the change type correctly", ^{
expect(@(testCopiedFilter.groupType)).to(equal(@(testFilter.groupType)));
});
});
-
+
describe(@"testing equality", ^{
__block SDLPermissionFilter *testSameFilter1 = nil;
__block SDLPermissionFilter *testSameFilter2 = nil;
__block SDLPermissionFilter *testDifferentFilter = nil;
-
+
beforeEach(^{
testSameFilter1 = [SDLPermissionFilter filterWithRPCNames:@[testPermissionElement1] groupType:SDLPermissionGroupTypeAny observer:^(NSDictionary<SDLPermissionElement *,NSNumber<SDLBool> *> * _Nonnull changedDict, SDLPermissionGroupStatus status) {}];
testSameFilter2 = [testSameFilter1 copy];
-
+
testDifferentFilter = [SDLPermissionFilter filterWithRPCNames:@[testPermissionElement1] groupType:SDLPermissionGroupTypeAny observer:^(NSDictionary<SDLPermissionElement *,NSNumber<SDLBool> *> * _Nonnull changedDict, SDLPermissionGroupStatus status) {}];
});
-
+
it(@"should say copied filters are the same", ^{
expect(testSameFilter1).to(equal(testSameFilter2));
});
-
+
it(@"should say new filters are different", ^{
expect(testSameFilter1).toNot(equal(testDifferentFilter));
});
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m
index 77823a799..e54acfbbc 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m
@@ -28,7 +28,7 @@ QuickSpecBegin(SDLPermissionsManagerSpec)
fdescribe(@"SDLPermissionsManager", ^{
__block SDLPermissionManager *testPermissionsManager = nil;
-
+
__block NSString *testRPCNameAllAllowed = nil;
__block NSString *testRPCNameAllDisallowed = nil;
__block NSString *testRPCNameFullLimitedAllowed = nil;
@@ -42,7 +42,7 @@ fdescribe(@"SDLPermissionsManager", ^{
__block SDLParameterPermissions *testParameterPermissionAllowed = nil;
__block SDLParameterPermissions *testParameterPermissionUserDisallowed = nil;
__block SDLParameterPermissions *testParameterPermissionAllowedAndDisallowed = nil;
-
+
__block SDLPermissionItem *testPermissionAllAllowed = nil;
__block SDLHMIPermissions *testHMIPermissionsAllAllowed = nil;
__block SDLPermissionItem *testPermissionAllDisallowed = nil;
@@ -51,13 +51,13 @@ fdescribe(@"SDLPermissionsManager", ^{
__block SDLHMIPermissions *testHMIPermissionsFullLimitedAllowed = nil;
__block SDLPermissionItem *testPermissionFullLimitedBackgroundAllowed = nil;
__block SDLHMIPermissions *testHMIPermissionsFullLimitedBackgroundAllowed = nil;
-
+
__block SDLOnPermissionsChange *testPermissionsChange = nil;
-
+
__block SDLOnHMIStatus *testLimitedHMIStatus = nil;
__block SDLOnHMIStatus *testBackgroundHMIStatus = nil;
__block SDLOnHMIStatus *testNoneHMIStatus = nil;
-
+
__block SDLRPCNotificationNotification *testPermissionsNotification = nil;
__block SDLRPCNotificationNotification *limitedHMINotification = nil;
__block SDLRPCNotificationNotification *backgroundHMINotification = nil;
@@ -66,7 +66,7 @@ fdescribe(@"SDLPermissionsManager", ^{
__block SDLPermissionElement *testPermissionElementAllAllowed = nil;
__block SDLPermissionElement *testPermissionElementFullLimitedAllowed = nil;
__block SDLPermissionElement *testPermissionElementDisallowed = nil;
-
+
beforeEach(^{
// Permission Names
testRPCNameAllAllowed = @"AllAllowed";
@@ -79,21 +79,21 @@ fdescribe(@"SDLPermissionsManager", ^{
testRPCParameterNameAllDisallowed = @"AllDisallowed";
testRPCParameterNameFullLimitedAllowed = @"FullAndLimitedAllowed";
testRPCParameterNameFullLimitedBackgroundAllowed = @"FullAndLimitedAndBackgroundAllowed";
-
+
// Create a manager
testPermissionsManager = [[SDLPermissionManager alloc] init];
-
+
// Permission states
testHMIPermissionsAllAllowed = [[SDLHMIPermissions alloc] init];
testHMIPermissionsAllAllowed.allowed = @[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone];
-
+
testHMIPermissionsAllDisallowed = [[SDLHMIPermissions alloc] init];
testHMIPermissionsAllDisallowed.userDisallowed = @[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone];
-
+
testHMIPermissionsFullLimitedAllowed = [[SDLHMIPermissions alloc] init];
testHMIPermissionsFullLimitedAllowed.allowed = @[SDLHMILevelFull, SDLHMILevelLimited];
testHMIPermissionsFullLimitedAllowed.userDisallowed = @[SDLHMILevelBackground, SDLHMILevelNone];
-
+
testHMIPermissionsFullLimitedBackgroundAllowed = [[SDLHMIPermissions alloc] init];
testHMIPermissionsFullLimitedBackgroundAllowed.allowed = @[SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelBackground];
testHMIPermissionsFullLimitedBackgroundAllowed.userDisallowed = @[SDLHMILevelNone];
@@ -108,7 +108,7 @@ fdescribe(@"SDLPermissionsManager", ^{
testParameterPermissionAllowedAndDisallowed = [[SDLParameterPermissions alloc] init];
testParameterPermissionAllowedAndDisallowed.allowed = @[testRPCParameterNameAllAllowed];
testParameterPermissionAllowedAndDisallowed.userDisallowed = @[testRPCParameterNameAllDisallowed];
-
+
// Assemble Permissions
SDLParameterPermissions *testParameterPermissions = [[SDLParameterPermissions alloc] init];
@@ -116,36 +116,36 @@ fdescribe(@"SDLPermissionsManager", ^{
testPermissionAllAllowed.rpcName = testRPCNameAllAllowed;
testPermissionAllAllowed.hmiPermissions = testHMIPermissionsAllAllowed;
testPermissionAllAllowed.parameterPermissions = testParameterPermissionAllowed;
-
+
testPermissionAllDisallowed = [[SDLPermissionItem alloc] init];
testPermissionAllDisallowed.rpcName = testRPCNameAllDisallowed;
testPermissionAllDisallowed.hmiPermissions = testHMIPermissionsAllDisallowed;
testPermissionAllDisallowed.parameterPermissions = testParameterPermissionUserDisallowed;
-
+
testPermissionFullLimitedAllowed = [[SDLPermissionItem alloc] init];
testPermissionFullLimitedAllowed.rpcName = testRPCNameFullLimitedAllowed;
testPermissionFullLimitedAllowed.hmiPermissions = testHMIPermissionsFullLimitedAllowed;
testPermissionFullLimitedAllowed.parameterPermissions = testParameterPermissionAllowedAndDisallowed;
-
+
testPermissionFullLimitedBackgroundAllowed = [[SDLPermissionItem alloc] init];
testPermissionFullLimitedBackgroundAllowed.rpcName = testRPCNameFullLimitedBackgroundAllowed;
testPermissionFullLimitedBackgroundAllowed.hmiPermissions = testHMIPermissionsFullLimitedBackgroundAllowed;
testPermissionFullLimitedBackgroundAllowed.parameterPermissions = testParameterPermissions;
-
+
// Create OnHMIStatus objects
testLimitedHMIStatus = [[SDLOnHMIStatus alloc] init];
testLimitedHMIStatus.hmiLevel = SDLHMILevelLimited;
-
+
testBackgroundHMIStatus = [[SDLOnHMIStatus alloc] init];
testBackgroundHMIStatus.hmiLevel = SDLHMILevelBackground;
-
+
testNoneHMIStatus = [[SDLOnHMIStatus alloc] init];
testNoneHMIStatus.hmiLevel = SDLHMILevelNone;
-
+
// Create OnPermissionsChange object
testPermissionsChange = [[SDLOnPermissionsChange alloc] init];
testPermissionsChange.permissionItem = @[testPermissionAllAllowed, testPermissionAllDisallowed, testPermissionFullLimitedAllowed, testPermissionFullLimitedBackgroundAllowed];
-
+
// Permission Notifications
testPermissionsNotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangePermissionsNotification object:nil rpcNotification:testPermissionsChange];
limitedHMINotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeHMIStatusNotification object:nil rpcNotification:testLimitedHMIStatus];
@@ -165,7 +165,7 @@ fdescribe(@"SDLPermissionsManager", ^{
expect(testPermissionsManager.currentHMILevel).to(beNil());
expect(testPermissionsManager.requiresEncryption).to(beFalse());
});
-
+
describe(@"checking if a permission is allowed", ^{
__block NSString *someRPCName = nil;
__block SDLRPCFunctionName someRPCFunctionName = nil;
@@ -198,7 +198,7 @@ fdescribe(@"SDLPermissionsManager", ^{
});
});
});
-
+
context(@"when permissions exist but no HMI level", ^{
context(@"deprecated isRPCAllowed: method", ^{
beforeEach(^{
@@ -225,7 +225,7 @@ fdescribe(@"SDLPermissionsManager", ^{
});
});
});
-
+
context(@"when permissions exist", ^{
context(@"deprecated isRPCAllowed: method", ^{
context(@"and the permission is allowed", ^{
@@ -288,10 +288,10 @@ fdescribe(@"SDLPermissionsManager", ^{
});
});
});
-
+
describe(@"checking the group status of RPCs", ^{
__block SDLPermissionGroupStatus testResultStatus = SDLPermissionGroupStatusUnknown;
-
+
context(@"with no permissions data", ^{
context(@"deprecated groupStatusOfRPCs: method", ^{
beforeEach(^{
@@ -316,7 +316,7 @@ fdescribe(@"SDLPermissionsManager", ^{
});
});
});
-
+
context(@"for an all allowed group", ^{
context(@"deprecated groupStatusOfRPCs: method", ^{
beforeEach(^{
@@ -346,7 +346,7 @@ fdescribe(@"SDLPermissionsManager", ^{
});
});
});
-
+
context(@"for an all disallowed group", ^{
context(@"deprecated groupStatusOfRPCs: method", ^{
beforeEach(^{
@@ -376,7 +376,7 @@ fdescribe(@"SDLPermissionsManager", ^{
});
});
});
-
+
context(@"for a mixed group", ^{
context(@"deprecated groupStatusOfRPCs: method", ^{
beforeEach(^{
@@ -407,7 +407,7 @@ fdescribe(@"SDLPermissionsManager", ^{
});
});
});
-
+
describe(@"checking the status of RPCs", ^{
__block NSDictionary<SDLPermissionRPCName, NSNumber *> *testResultPermissionStatusDict = nil;
context(@"with no permissions data", ^{
@@ -436,7 +436,7 @@ fdescribe(@"SDLPermissionsManager", ^{
});
});
});
-
+
context(@"with permissions data", ^{
context(@"deprecated statusOfRPCs: method", ^{
beforeEach(^{
@@ -598,7 +598,7 @@ fdescribe(@"SDLPermissionsManager", ^{
beforeEach(^{
testObserverCalled = NO;
- [testPermissionsManager subscribeToRPCNames:@[testPermissionElementAllAllowed, testPermissionElementDisallowed] groupType:SDLPermissionGroupTypeAny withHandler:^(NSDictionary<SDLPermissionElement *,NSNumber *> * _Nonnull change, SDLPermissionGroupStatus status) {
+ [testPermissionsManager subscribeToRPCNames:@[testPermissionElementAllAllowed, testPermissionElementDisallowed] groupType:SDLPermissionGroupTypeAny withHandler:^(NSDictionary<SDLPermissionRPCName,NSNumber *> * _Nonnull change, SDLPermissionGroupStatus status) {
testObserverCalled = YES;
}];
});
@@ -620,7 +620,7 @@ fdescribe(@"SDLPermissionsManager", ^{
[[NSNotificationCenter defaultCenter] postNotification:testPermissionsNotification];
// This should not be called even with data currently present, the handler will only be called when an permissions update occurs after the RPC is subscribed to
- [testPermissionsManager subscribeToRPCNames:@[testPermissionElementAllAllowed, testPermissionElementDisallowed] groupType:SDLPermissionGroupTypeAny withHandler:^(NSDictionary<SDLPermissionElement *,NSNumber *> * _Nonnull change, SDLPermissionGroupStatus status) {
+ [testPermissionsManager subscribeToRPCNames:@[testPermissionElementAllAllowed, testPermissionElementDisallowed] groupType:SDLPermissionGroupTypeAny withHandler:^(NSDictionary<SDLPermissionRPCName,NSNumber *> * _Nonnull change, SDLPermissionGroupStatus status) {
testObserverCalled = YES;
}];
});
@@ -1155,7 +1155,7 @@ fdescribe(@"SDLPermissionsManager", ^{
expect(testResultBOOL).to(beFalse());
});
});
-
+
context(@"when permissions exist and HMI level exists", ^{
context(@"and the parameter permission is allowed", ^{
beforeEach(^{