X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Facceptance%2Fconcat_spec.rb;fp=3rdparty%2Fmodules%2Fstdlib%2Fspec%2Facceptance%2Fconcat_spec.rb;h=8d184d1e96aff7122ecd6190f791348b919f9315;hb=6963202b4b62c2816655ac9532521b018fdf83bd;hp=06b649f19f6fb8c5027f3c6cdf7df92480281fe6;hpb=a69999e580f8b3abd12446c2d6ad59e517651813;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/spec/acceptance/concat_spec.rb b/3rdparty/modules/stdlib/spec/acceptance/concat_spec.rb index 06b649f19..8d184d1e9 100755 --- a/3rdparty/modules/stdlib/spec/acceptance/concat_spec.rb +++ b/3rdparty/modules/stdlib/spec/acceptance/concat_spec.rb @@ -1,7 +1,7 @@ #! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' -describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do +describe 'concat function' do describe 'success' do it 'should concat one array to another' do pp = <<-EOS @@ -34,6 +34,20 @@ describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('oper } EOS + apply_manifest(pp, :catch_failures => true) + end + it 'should concat hash arguments' do + pp = <<-EOS + $output = concat([{"a" => "b"}], {"c" => "d", "e" => "f"}) + validate_array($output) + if size($output) != 2 { + fail("${output} should have 2 elements.") + } + if $output[1] != {"c" => "d", "e" => "f"} { + fail("${output} does not have the expected hash for the second element.") + } + EOS + apply_manifest(pp, :catch_failures => true) end end