summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m
diff options
context:
space:
mode:
authorJustin Beharry <justin.beharry@livio.io>2022-08-12 14:00:47 -0400
committerJustin Beharry <justin.beharry@livio.io>2022-08-12 14:00:47 -0400
commit520b0d1be9e4a9341487eaadc35bcf8edba7c109 (patch)
treef7ea0165df03e68d8867ba8823f863f94e0d962a /SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m
parentaba5ba83d902a1c5e7e68915180eaae319855430 (diff)
downloadsdl_ios-bugfix/issue-1598-audio-manager-suspend.tar.gz
stop transcoding audio on secondary disconnectbugfix/issue-1598-audio-manager-suspend
-secondaryTransportDidDisconnect should stop transcoding audio -Add unit test to make sure the stop transcoding method is called
Diffstat (limited to 'SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m')
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLStreamingAudioLifecycleManagerSpec.m14
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]);