diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/provider/user/linux_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/provider/user/linux_spec.rb b/spec/unit/provider/user/linux_spec.rb index 2470b26e2c..1c487c0de9 100644 --- a/spec/unit/provider/user/linux_spec.rb +++ b/spec/unit/provider/user/linux_spec.rb @@ -77,6 +77,18 @@ describe Chef::Provider::User::Linux do expect( @new_resource.manage_home ).to be false end + it "supports[:manage_home] (incorectly) acts like manage_home" do + Chef::Config[:treat_deprecation_warnings_as_errors] = false + @new_resource.supports({ manage_home: true }) + expect( provider.useradd_options ).to eql(["-m"]) + end + + it "supports[:manage_home] does not change behavior of manage_home: false", chef: ">= 13" do + Chef::Config[:treat_deprecation_warnings_as_errors] = false + @new_resource.supports({ manage_home: true }) + expect( provider.useradd_options ).to eql(["-M"]) + end + it "by default manage_home is false and we use -M" do expect( provider.useradd_options ).to eql(["-M"]) end |