summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m')
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m23
1 files changed, 9 insertions, 14 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m
index 83a2f8a4d..b663009a7 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m
@@ -143,20 +143,7 @@ describe(@"uploading / deleting single files with the file manager", ^{
});
});
- describe(@"after receiving a ListFiles error due to the file manager not being able to start", ^{
- beforeEach(^{
- SDLListFilesOperation *operation = testFileManager.pendingTransactions.firstObject;
- operation.completionHandler(NO, initialSpaceAvailable, testInitialFileNames, [NSError sdl_fileManager_unableToStartError]);
- });
-
- it(@"should handle the error properly", ^{
- expect(testFileManager.currentState).to(match(SDLFileManagerStateStartupError));
- expect(testFileManager.remoteFileNames).to(beEmpty());
- expect(@(testFileManager.bytesAvailable)).to(equal(initialSpaceAvailable));
- });
- });
-
- describe(@"getting an error from the module to a ListFiles request", ^{
+ describe(@"getting an error for a ListFiles request", ^{
__block SDLListFilesOperation *operation = nil;
beforeEach(^{
@@ -186,6 +173,14 @@ describe(@"uploading / deleting single files with the file manager", ^{
expect(testFileManager.remoteFileNames).to(beEmpty());
expect(@(testFileManager.bytesAvailable)).to(equal(initialSpaceAvailable));
});
+
+ it(@"should transition to the error state if it gets a ListFiles error without a resultCode", ^{
+ operation.completionHandler(NO, initialSpaceAvailable, testInitialFileNames, [NSError sdl_fileManager_unableToStartError]);
+
+ expect(testFileManager.currentState).to(match(SDLFileManagerStateStartupError));
+ expect(testFileManager.remoteFileNames).to(beEmpty());
+ expect(@(testFileManager.bytesAvailable)).to(equal(initialSpaceAvailable));
+ });
});
describe(@"after receiving a ListFiles response", ^{