diff options
author | lapinskijw <jlapinski.dev@gmail.com> | 2020-06-23 09:01:17 -0400 |
---|---|---|
committer | lapinskijw <jlapinski.dev@gmail.com> | 2020-06-23 09:01:17 -0400 |
commit | 2b0ab748d5a31e0f29356dda1ced84367509fe6c (patch) | |
tree | a706b71b8895aa0a7957043145825a136320cac1 | |
parent | 344c69646d1c2fcbc340d52b61e27899696d43db (diff) | |
download | sdl_ios-2b0ab748d5a31e0f29356dda1ced84367509fe6c.tar.gz |
began fixing tests for permissions manager spec
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m | 2 | ||||
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m index d40a1812e..80dac5c6e 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionFilterSpec.m @@ -7,7 +7,7 @@ QuickSpecBegin(SDLPermissionFilterSpec) -fdescribe(@"A filter", ^{ +describe(@"A filter", ^{ __block NSString *testRPCName1 = nil; __block NSString *testRPCName2 = nil; __block SDLPermissionElement *testPermissionElement1 = nil; diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m index 257c01a8d..0830c27d4 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m @@ -62,6 +62,9 @@ fdescribe(@"SDLPermissionsManager", ^{ __block SDLRPCNotificationNotification *limitedHMINotification = nil; __block SDLRPCNotificationNotification *backgroundHMINotification = nil; __block SDLRPCNotificationNotification *noneHMINotification = nil; + + __block SDLPermissionElement *testPermissionElementAllAllowed = nil; + __block SDLPermissionElement *testPermissionElementFullLimitedAllowed = nil; beforeEach(^{ // Permission Names @@ -147,6 +150,9 @@ fdescribe(@"SDLPermissionsManager", ^{ limitedHMINotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeHMIStatusNotification object:nil rpcNotification:testLimitedHMIStatus]; backgroundHMINotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeHMIStatusNotification object:nil rpcNotification:testBackgroundHMIStatus]; noneHMINotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangeHMIStatusNotification object:nil rpcNotification:testNoneHMIStatus]; + + testPermissionElementAllAllowed = [[SDLPermissionElement alloc] initWithRPCName:testRPCNameAllAllowed parameterPermissions:testPermissionAllAllowed.parameterPermissions]; + testPermissionElementFullLimitedAllowed = [[SDLPermissionElement alloc] initWithRPCName:testRPCNameFullLimitedAllowed parameterPermissions:testPermissionFullLimitedAllowed.parameterPermissions]; }); it(@"should clear when stopped", ^{ @@ -300,7 +306,7 @@ fdescribe(@"SDLPermissionsManager", ^{ context(@"groupStatusOfRPCNames: method", ^{ beforeEach(^{ - testResultStatus = [testPermissionsManager groupStatusOfRPCNames:@[testRPCNameAllAllowed, testRPCNameAllDisallowed]]; + testResultStatus = [testPermissionsManager groupStatusOfRPCNames:@[testPermissionElementAllAllowed, testPermissionElementFullLimitedAllowed]]; }); it(@"should return unknown", ^{ @@ -330,7 +336,7 @@ fdescribe(@"SDLPermissionsManager", ^{ [[NSNotificationCenter defaultCenter] postNotification:limitedHMINotification]; [[NSNotificationCenter defaultCenter] postNotification:testPermissionsNotification]; - testResultStatus = [testPermissionsManager groupStatusOfRPCNames:@[testRPCNameAllAllowed, testRPCNameFullLimitedAllowed]]; + testResultStatus = [testPermissionsManager groupStatusOfRPCNames:@[testPermissionElementAllAllowed, testPermissionElementFullLimitedAllowed]]; }); it(@"should return allowed", ^{ |