summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorWilson McCoubrey <wilson@mccoubreys.co.uk>2016-11-10 16:52:30 +0000
committerGitHub <noreply@github.com>2016-11-10 16:52:30 +0000
commitdcef77af4cef2870874f76c06e92f601aeb5bc0c (patch)
tree7116b1977092ce65507661400af791405c171702 /spec
parentb527d3b303fbe8e6deab58f491bc178c761495cd (diff)
parent17a49baae33a78d6aa781aaaadafc08b43def040 (diff)
Merge pull request #632 from MiamiOH/master
Handle array values in join_keys_to_values function
Diffstat (limited to 'spec')
-rwxr-xr-xspec/functions/join_keys_to_values_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/functions/join_keys_to_values_spec.rb b/spec/functions/join_keys_to_values_spec.rb
index 6c109d1..c2bae5b 100755
--- a/spec/functions/join_keys_to_values_spec.rb
+++ b/spec/functions/join_keys_to_values_spec.rb
@@ -16,4 +16,8 @@ describe 'join_keys_to_values' do
result = subject.call([{ 'key1' => 'value1', 'key2' => 'value2' }, ':'])
expect(result.sort).to eq(['key1:value1', 'key2:value2'].sort)
end
+ it 'should run join_keys_to_values(<hash with array value>, " ") and return the proper array' do
+ result = subject.call([{ 'key1' => 'value1', 'key2' => ['value2', 'value3'] }, ' '])
+ expect(result.sort).to eq(['key1 value1', 'key2 value2', 'key2 value3'].sort)
+ end
end