diff options
author | Tim Smith <tsmith@chef.io> | 2017-08-16 14:59:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-16 14:59:28 -0700 |
commit | 188cf6702dbaf77b1f89bb99c4f489888471212c (patch) | |
tree | adbe607542c0e076dac6560916d985452f2dbe0f /spec | |
parent | 09c91bd737aefd6624ab74040606328d5d457cc6 (diff) | |
parent | b985f6dcf93d822aad7a7f4d87029fd533d26f50 (diff) | |
download | chef-188cf6702dbaf77b1f89bb99c4f489888471212c.tar.gz |
Merge pull request #6316 from twk3/deep-merge-preserve-vivid-nil
Fix an issue where DeepMerge overwrites nil values
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/node_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb index 73f0e6da09..7dc972b5a0 100644 --- a/spec/unit/node_spec.rb +++ b/spec/unit/node_spec.rb @@ -337,6 +337,13 @@ describe Chef::Node do node.override_unless[:decontamination] = "foo" expect(node.override[:decontamination]).to eql("foo") end + + it "consume_attributes does not exhibit chef/chef/issues/6302 bug" do + node.normal["a"]["r1"] = nil + node.consume_attributes({ "a" => { "r2" => nil } }) + expect(node["a"]["r1"]).to be_nil + expect(node["a"]["r2"]).to be_nil + end end describe "default attributes" do |