Update stdlib
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / spec / acceptance / concat_spec.rb
index 06b649f..8d184d1 100755 (executable)
@@ -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