summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m')
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m
index 8e8a2e7c3..0763f6bc4 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLVoiceCommandSpec.m
@@ -7,12 +7,15 @@ QuickSpecBegin(SDLVoiceCommandSpec)
describe(@"a voice command", ^{
__block SDLVoiceCommand *testCommand = nil;
+ __block SDLVoiceCommand *testCommand2 = nil;
describe(@"initializing", ^{
__block NSArray<NSString *> *someVoiceCommands = nil;
+ __block NSArray<NSString *> *someVoiceCommands2 = nil;
beforeEach(^{
someVoiceCommands = @[@"some command"];
+ someVoiceCommands2 = @[@"Test 1", @"Test 1", @"Test 1"];
});
it(@"should initialize properly", ^{
@@ -20,6 +23,13 @@ describe(@"a voice command", ^{
expect(testCommand.voiceCommands).to(equal(someVoiceCommands));
});
+
+ it(@"should initialize properly if it have multiple of the same command string", ^{
+ testCommand2 = [[SDLVoiceCommand alloc] initWithVoiceCommands:someVoiceCommands2 handler:^{}];
+
+ expect(testCommand2.voiceCommands).toNot(equal(someVoiceCommands2));
+ expect(testCommand2.voiceCommands).to(haveCount(1));
+ });
});
});