summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakamitsu Yoshii <tyoshii@xevo.com>2018-08-13 13:11:01 +0900
committerTakamitsu Yoshii <tyoshii@xevo.com>2018-08-13 13:11:01 +0900
commit304ddbce75e21de511e58506e922195caf52cc96 (patch)
tree19bc4fbb95930709b4d488284ee29f789d7fe059
parent415750e6e8e00d9a0b00640298b98170e952fa42 (diff)
downloadsdl_ios-304ddbce75e21de511e58506e922195caf52cc96.tar.gz
add test to SDLStreamingVideoLifecycleManagerSpec
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
index 33062b9db..857ca6b83 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLStreamingVideoLifecycleManagerSpec.m
@@ -304,6 +304,17 @@ describe(@"the streaming video manager", ^{
expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown));
});
});
+
+ context(@"and hmi state changes to background after app becomes inactive", ^{
+ beforeEach(^{
+ [streamingLifecycleManager.appStateMachine setToState:SDLAppStateInactive fromOldState:nil callEnterTransition:YES];
+ sendNotificationForHMILevel(SDLHMILevelBackground, SDLVideoStreamingStateNotStreamable);
+ });
+
+ it(@"should close the stream", ^{
+ expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamManagerStateShuttingDown));
+ });
+ });
});
});