diff options
Diffstat (limited to 'spec/unit/node_spec.rb')
-rw-r--r-- | spec/unit/node_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb index f2a78f87cd..832e10f645 100644 --- a/spec/unit/node_spec.rb +++ b/spec/unit/node_spec.rb @@ -724,6 +724,15 @@ describe Chef::Node do json.should =~ /\"run_list\":\[\"role\[Cthulu\]\",\"role\[Hastur\]\"\]/ end + it "should serialize the correct run list", :json => true do + node.run_list << "role[marxist]" + node.run_list << "role[leninist]" + node.override_runlist << "role[stalinist]" + node.run_list.should be_include("role[stalinist]") + json = Chef::JSONCompat.to_json(node) + json.should =~ /\"run_list\":\[\"role\[marxist\]\",\"role\[leninist\]\"\]/ + end + it "merges the override components into a combined override object" do node.attributes.role_override["role override"] = "role override" node.attributes.env_override["env override"] = "env override" |