summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2018-05-04 17:47:49 -0700
committerNoah Kantrowitz <noah@coderanger.net>2018-06-05 20:25:11 -0700
commit733cc37b5888c6c9e324785ce85a1d3662cd3602 (patch)
treeff4b0cead8a88e0366b21b73870949ccb5dec2d0
parent5ed59a78f28cce1d6a8f86e1ba7296846edd7a3f (diff)
downloadchef-733cc37b5888c6c9e324785ce85a1d3662cd3602.tar.gz
Fix up existing tests.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
-rw-r--r--spec/unit/node_map_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/node_map_spec.rb b/spec/unit/node_map_spec.rb
index ab29a839e8..7e4980219a 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 eql({ :thing => [{ :klass => Bar }] })
+ expect( node_map.delete_class(Bar) ).to include({ :thing => [{ :klass => Bar, :cookbook_override => false, :core_override => false }] })
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 }] })
+ expect( node_map.delete_class(Bar) ).to eql({ :thing => [{ :klass => Bar, :cookbook_override => false, :core_override => false }] })
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 }], :thing2 => [{ :klass => Bar }] })
+ 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.get(node, :thing1) ).to eql(nil)
expect( node_map.get(node, :thing2) ).to eql(Foo)
end