diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2020-05-26 09:03:24 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2020-05-26 09:03:24 -0400 |
commit | c7fbf438345d38dd581a4b1c5df5930ffa1f90e5 (patch) | |
tree | f8479ab9229faae22b363050a4bbda20aeaa779a | |
parent | f993d7da76927090b6d6f9f8403aa3c5d58091b5 (diff) | |
download | sdl_ios-c7fbf438345d38dd581a4b1c5df5930ffa1f90e5.tar.gz |
Additional test fixes
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m index 2cd87bb3b..99aa9dbb5 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLTextAndGraphicManagerSpec.m @@ -862,7 +862,7 @@ describe(@"text and graphic manager", ^{ }); }); - fcontext(@"updating images", ^{ + context(@"updating images", ^{ __block NSString *testTextFieldText = @"mainFieldText"; beforeEach(^{ @@ -881,6 +881,23 @@ describe(@"text and graphic manager", ^{ testManager.textField1 = testTextFieldText; }); + context(@"when imageFields are nil", ^{ + beforeEach(^{ + testManager.windowCapability.imageFields = nil; + }); + + it(@"should send nothing", ^{ + testManager.primaryGraphic = testArtwork; + testManager.secondaryGraphic = testArtwork; + testManager.batchUpdates = NO; + [testManager updateWithCompletionHandler:nil]; + + expect(testManager.inProgressUpdate.graphic).to(beNil()); + expect(testManager.inProgressUpdate.secondaryGraphic).to(beNil()); + expect(testManager.inProgressUpdate.mainField1).to(equal(testTextFieldText)); + }); + }); + context(@"when the image is already on the head unit", ^{ beforeEach(^{ OCMStub([mockFileManager hasUploadedFile:[OCMArg isNotNil]]).andReturn(YES); @@ -896,23 +913,6 @@ describe(@"text and graphic manager", ^{ expect(testManager.inProgressUpdate.secondaryGraphic.value).to(equal(testArtworkName)); expect(testManager.inProgressUpdate.mainField1).to(equal(testTextFieldText)); }); - - context(@"when imageFields are nil", ^{ - beforeEach(^{ - testManager.windowCapability = [[SDLWindowCapability alloc] init]; - }); - - it(@"should send nothing", ^{ - testManager.primaryGraphic = testArtwork; - testManager.secondaryGraphic = testArtwork; - testManager.batchUpdates = NO; - [testManager updateWithCompletionHandler:nil]; - - expect(testManager.inProgressUpdate.graphic.value).to(equal(testArtworkName)); - expect(testManager.inProgressUpdate.secondaryGraphic.value).to(equal(testArtworkName)); - expect(testManager.inProgressUpdate.mainField1).to(equal(testTextFieldText)); - }); - }); }); context(@"when the image is a static icon", ^{ |