summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2021-08-05 12:04:51 -0400
committerJoel Fischer <joeljfischer@gmail.com>2021-08-05 12:04:51 -0400
commitc84b402cd0e4a1c651b1204d3eac7fe0710e9b49 (patch)
treeea6d4a4509a292426edb87da1279a6f78d747ec5
parentaa04b9c5766547aa37dd5d6df8875ab7b8b3f737 (diff)
downloadsdl_ios-c84b402cd0e4a1c651b1204d3eac7fe0710e9b49.tar.gz
More test fixes
-rw-r--r--SmartDeviceLink/private/SDLMenuReplaceOperation.m2
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m1
2 files changed, 2 insertions, 1 deletions
diff --git a/SmartDeviceLink/private/SDLMenuReplaceOperation.m b/SmartDeviceLink/private/SDLMenuReplaceOperation.m
index 2df9834e4..a47e9f1c1 100644
--- a/SmartDeviceLink/private/SDLMenuReplaceOperation.m
+++ b/SmartDeviceLink/private/SDLMenuReplaceOperation.m
@@ -98,7 +98,7 @@ NS_ASSUME_NONNULL_BEGIN
}
// If both old and new cells are empty, nothing needs to happen
- if ((runScore.oldStatus.count == 0) && (runScore.updatedStatus.count == 0)) { return [self finishOperation]; }
+ if (runScore.isEmpty) { return [self finishOperation]; }
// Drop the cells into buckets based on the run score
NSArray<SDLMenuCell *> *cellsToDelete = [self sdl_filterDeleteMenuItemsWithOldMenuItems:self.currentMenu basedOnStatusList:runScore.oldStatus];
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m
index 037f2f9cb..28cb0e8b3 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m
@@ -232,6 +232,7 @@ describe(@"a menu replace operation", ^{
deleteCommandResponse.success = @YES;
deleteCommandResponse.resultCode = SDLResultSuccess;
[testConnectionManager respondToLastRequestWithResponse:deleteCommandResponse];
+ [testConnectionManager respondToLastMultipleRequestsWithSuccess:YES];
NSPredicate *deleteCommandPredicate = [NSPredicate predicateWithFormat:@"self isMemberOfClass:%@", [SDLDeleteCommand class]];
NSArray *deletes = [[testConnectionManager.receivedRequests copy] filteredArrayUsingPredicate:deleteCommandPredicate];