diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2016-02-25 17:03:24 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2016-02-25 17:03:24 -0500 |
commit | c6e886115783cd53068a7e9a0cef8f3a8bc868da (patch) | |
tree | b0b18a033e50f9564cc4e2db3c8df2900125c8d0 | |
parent | b61fd46a75352cf478f349babade1cca1311fba3 (diff) | |
download | sdl_ios-c6e886115783cd53068a7e9a0cef8f3a8bc868da.tar.gz |
Fix SDLSendLocationSpec
-rw-r--r-- | SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.m | 12 | ||||
-rw-r--r-- | SmartDeviceLink-iOS/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.m index cbf9d6cd3..7bf1c5c70 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.m @@ -71,6 +71,18 @@ } } +- (NSString *)locationDescription { + return parameters[NAMES_locationDescription]; +} + +- (void)setLocationDescription:(NSString *)locationDescription { + if (locationDescription != nil) { + parameters[NAMES_locationDescription] = locationDescription; + } else { + [parameters removeObjectForKey:NAMES_locationDescription]; + } +} + - (NSArray *)addressLines { return parameters[NAMES_addressLines]; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m b/SmartDeviceLink-iOS/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m index e5454523b..ccd4bafdb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m +++ b/SmartDeviceLink-iOS/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSendLocationSpec.m @@ -114,7 +114,7 @@ describe(@"Send Location RPC", ^{ }); describe(@"when initialized with a dictionary", ^{ - fcontext(@"when parameters are set correctly", ^{ + context(@"when parameters are set correctly", ^{ beforeEach(^{ someLongitude = @123.4567; someLatitude = @65.4321; @@ -132,7 +132,7 @@ describe(@"Send Location RPC", ^{ NAMES_locationDescription: someLocationDescription, NAMES_addressLines: someAddressLines, NAMES_phoneNumber: somePhoneNumber, - NAMES_image: someImage + NAMES_locationImage: someImage } } }; |