summaryrefslogtreecommitdiff
path: root/spec/unit/policy_builder/expand_node_object_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/policy_builder/expand_node_object_spec.rb')
-rw-r--r--spec/unit/policy_builder/expand_node_object_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/policy_builder/expand_node_object_spec.rb b/spec/unit/policy_builder/expand_node_object_spec.rb
index dc8b532e2b..5c6f39d28c 100644
--- a/spec/unit/policy_builder/expand_node_object_spec.rb
+++ b/spec/unit/policy_builder/expand_node_object_spec.rb
@@ -59,6 +59,10 @@ describe Chef::PolicyBuilder::ExpandNodeObject do
expect(policy_builder).to respond_to(:sync_cookbooks)
end
+ it "implements a temporary_policy? method" do
+ expect(policy_builder).to respond_to(:temporary_policy?)
+ end
+
describe "loading the node" do
context "on chef-solo" do
@@ -181,6 +185,10 @@ describe Chef::PolicyBuilder::ExpandNodeObject do
expect(node["fqdn"]).to eq(ohai_data["fqdn"])
end
+ it "reports that a temporary_policy is not being used" do
+ expect(policy_builder.temporary_policy?).to be_false
+ end
+
describe "when the given run list is not in expanded form" do
# NOTE: for chef-client, the behavior is always to expand the run list,
@@ -239,6 +247,10 @@ describe Chef::PolicyBuilder::ExpandNodeObject do
expect(policy_builder.original_runlist).to eq(primary_runlist)
end
+ it "reports that a temporary policy is being used" do
+ expect(policy_builder.temporary_policy?).to be_true
+ end
+
end
context "when no environment is specified" do