summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2016-12-06 09:58:57 -0800
committerTim Smith <tsmith@chef.io>2016-12-06 09:58:57 -0800
commit638f5cc352d25334a7ee0f2a779abf5b3bfe00bd (patch)
treef72cb4560a2badafe35962f02f75c85d816c0717
parente71666241433a48aff961e93ea781d5ed890dd2d (diff)
downloadchef-638f5cc352d25334a7ee0f2a779abf5b3bfe00bd.tar.gz
Add a spec for supports non_unique throwing a deprecation message
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/provider/user/linux_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/provider/user/linux_spec.rb b/spec/unit/provider/user/linux_spec.rb
index ca62f2b150..ce9b84ec92 100644
--- a/spec/unit/provider/user/linux_spec.rb
+++ b/spec/unit/provider/user/linux_spec.rb
@@ -67,6 +67,12 @@ describe Chef::Provider::User::Linux do
expect( @new_resource.supports[:non_unique] ).to be false
end
+ it "throws a deprecation warning on setting supports[:non_unique]" do
+ Chef::Config[:treat_deprecation_warnings_as_errors] = false
+ expect(Chef).to receive(:deprecated).with(:supports_property, "supports { non_unique: true } on the user resource is deprecated and will be removed in Chef 13, set non_unique true instead")
+ @new_resource.supports( { :non_unique => true } )
+ end
+
it "throws a deprecation warning on setting supports[:manage_home]" do
Chef::Config[:treat_deprecation_warnings_as_errors] = false
expect(Chef).to receive(:deprecated).with(:supports_property, "supports { manage_home: true } on the user resource is deprecated and will be removed in Chef 13, set manage_home true instead")