]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(MODULES-444) Acceptance test for primitives
authorPeter Souter <p.souter@kainos.com>
Thu, 4 Dec 2014 14:15:03 +0000 (14:15 +0000)
committerPeter Souter <p.souter@kainos.com>
Thu, 4 Dec 2014 14:15:03 +0000 (14:15 +0000)
`concat` should be able to concat arrays and primitives

spec/acceptance/concat_spec.rb

index 7bda3653a057a04b4bbffc239e829f6b215254b6..0d5e831676136c662688140b7ea3b6554021d934 100755 (executable)
@@ -12,6 +12,17 @@ describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('oper
       }
       EOS
 
+      apply_manifest(pp, :catch_failures => true)
+    end
+    it 'should concat arrays and primitives to array' do
+      pp = <<-EOS
+      $output = concat(['1','2','3'],'4','5','6',['7','8','9'])
+      validate_array($output)
+      if size($output) != 9 {
+        fail("${output} should have 9 elements.")
+      }
+      EOS
+
       apply_manifest(pp, :catch_failures => true)
     end
   end