summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/parser/functions/delete_values_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/puppet/parser/functions/delete_values_spec.rb')
-rw-r--r--spec/unit/puppet/parser/functions/delete_values_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/puppet/parser/functions/delete_values_spec.rb b/spec/unit/puppet/parser/functions/delete_values_spec.rb
index c62e55f..180cc30 100644
--- a/spec/unit/puppet/parser/functions/delete_values_spec.rb
+++ b/spec/unit/puppet/parser/functions/delete_values_spec.rb
@@ -27,4 +27,10 @@ describe "the delete_values function" do
result.should(eq({ 'a'=>'A', 'B'=>'C' }))
end
+ it "should not change origin hash passed as argument" do
+ origin_hash = { 'a' => 1, 'b' => 2, 'c' => 3 }
+ result = scope.function_delete_values([origin_hash, 2])
+ origin_hash.should(eq({ 'a' => 1, 'b' => 2, 'c' => 3 }))
+ end
+
end