diff options
author | Bryan McLellan <btm@loftninjas.org> | 2018-10-16 15:05:47 -0400 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2019-05-06 12:56:55 -0400 |
commit | 9d5f5c40362d1fd7b0323cf0880300d6165b3a94 (patch) | |
tree | 2bb91f44829455b5566c0de4ad6bb154dd610e4b /spec | |
parent | 7560313217c851c5b018b27d6ea4bae8c3af0ff1 (diff) | |
download | chef-9d5f5c40362d1fd7b0323cf0880300d6165b3a94.tar.gz |
Target Mode initial implementation
Signed-off-by: Bryan McLellan <btm@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/node_map_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/node_map_spec.rb b/spec/unit/node_map_spec.rb index 9c161f3893..d486d913aa 100644 --- a/spec/unit/node_map_spec.rb +++ b/spec/unit/node_map_spec.rb @@ -145,14 +145,14 @@ describe Chef::NodeMap do describe "deleting classes" do it "deletes a class and removes the mapping completely" do node_map.set(:thing, Bar) - expect( node_map.delete_class(Bar) ).to include({ thing: [{ klass: Bar, cookbook_override: false, core_override: false }] }) + expect( node_map.delete_class(Bar) ).to include({ thing: [{ klass: Bar, cookbook_override: false, core_override: false, target_mode: nil }] }) expect( node_map.get(node, :thing) ).to eql(nil) end it "deletes a class and leaves the mapping that still has an entry" do node_map.set(:thing, Bar) node_map.set(:thing, Foo) - expect( node_map.delete_class(Bar) ).to eql({ thing: [{ klass: Bar, cookbook_override: false, core_override: false }] }) + expect( node_map.delete_class(Bar) ).to eql({ thing: [{ klass: Bar, cookbook_override: false, core_override: false, target_mode: nil }] }) expect( node_map.get(node, :thing) ).to eql(Foo) end @@ -160,7 +160,7 @@ describe Chef::NodeMap do node_map.set(:thing1, Bar) node_map.set(:thing2, Bar) node_map.set(:thing2, Foo) - expect( node_map.delete_class(Bar) ).to eql({ thing1: [{ klass: Bar, cookbook_override: false, core_override: false }], thing2: [{ klass: Bar, cookbook_override: false, core_override: false }] }) + expect( node_map.delete_class(Bar) ).to eql({ thing1: [{ klass: Bar, cookbook_override: false, core_override: false, target_mode: nil }], thing2: [{ klass: Bar, cookbook_override: false, core_override: false, target_mode: nil }] }) expect( node_map.get(node, :thing1) ).to eql(nil) expect( node_map.get(node, :thing2) ).to eql(Foo) end |