summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorJared Kauppila <Jared.Kauppila@sentry.com>2021-10-26 10:06:31 -0500
committerJared Kauppila <Jared.Kauppila@sentry.com>2021-10-26 10:06:42 -0500
commit6a4f2e50388c827d1bbf37a7e449676576cbdf54 (patch)
tree3f21fd6b5efd6f5e3797df57f4b9f6b2ed7ee442 /spec/unit
parent05986bd3460175a821999701b43d40c7c705e491 (diff)
downloadchef-6a4f2e50388c827d1bbf37a7e449676576cbdf54.tar.gz
Add support for `sensitive` in `chef_client_trusted_certificate`
Signed-off-by: Jared Kauppila <Jared.Kauppila@sentry.com>
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/resource/chef_client_trusted_certificate_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/unit/resource/chef_client_trusted_certificate_spec.rb b/spec/unit/resource/chef_client_trusted_certificate_spec.rb
index 558e737555..66f8ebe682 100644
--- a/spec/unit/resource/chef_client_trusted_certificate_spec.rb
+++ b/spec/unit/resource/chef_client_trusted_certificate_spec.rb
@@ -51,4 +51,18 @@ describe Chef::Resource::ChefClientTrustedCertificate do
expect(provider.cert_path).to match(%r{trusted_certs/something.pem$})
end
end
+
+ describe "sensitive attribute" do
+ context "should be insensitive by default" do
+ it { expect(resource.sensitive).to(be_falsey) }
+ end
+
+ context "when set" do
+ before { resource.sensitive(true) }
+
+ it "should be set on the resource" do
+ expect(resource.sensitive).to(be_truthy)
+ end
+ end
+ end
end