diff options
Diffstat (limited to 'SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m')
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m index cca65997b..5a6c58e4f 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m @@ -408,6 +408,20 @@ describe(@"the streaming audio manager", ^{ }); }); + describe(@"when secondary transport disconnects", ^{ + beforeEach(^{ + [streamingLifecycleManager.audioStreamStateMachine setToState:SDLAudioStreamManagerStateReady fromOldState:nil callEnterTransition:NO]; + [streamingLifecycleManager secondaryTransportDidDisconnect]; + }); + + it(@"should transition to the stopped state and stop transcoding", ^{ + expect(streamingLifecycleManager.currentAudioStreamState).to(equal(SDLAudioStreamManagerStateStopped)); + + expect(streamingLifecycleManager.protocol).to(beNil()); + OCMVerify([mockAudioStreamManager stop]); + }); + }); + describe(@"starting the manager when it's STOPPED", ^{ __block SDLProtocol *protocolMock = OCMClassMock([SDLProtocol class]); |