summaryrefslogtreecommitdiff
path: root/spec/unit/policy_builder
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/policy_builder')
-rw-r--r--spec/unit/policy_builder/dynamic_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/policy_builder/dynamic_spec.rb b/spec/unit/policy_builder/dynamic_spec.rb
index 105a34390e..aff19f4d11 100644
--- a/spec/unit/policy_builder/dynamic_spec.rb
+++ b/spec/unit/policy_builder/dynamic_spec.rb
@@ -156,6 +156,19 @@ describe Chef::PolicyBuilder::Dynamic do
end
+ context "and deployment_group and policy_document_native_api are set on Chef::Config" do
+
+ before do
+ Chef::Config[:deployment_group] = "example-policy-staging"
+ Chef::Config[:policy_document_native_api] = false
+ end
+
+ it "uses the Policyfile implementation" do
+ expect(implementation).to be_a(Chef::PolicyBuilder::Policyfile)
+ end
+
+ end
+
context "and policyfile attributes are present in json_attribs" do
let(:json_attribs) { {"policy_name" => "example-policy", "policy_group" => "testing"} }