summaryrefslogtreecommitdiff
path: root/spec/unit/provider/user/linux_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-08-23 18:21:01 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-08-23 18:21:01 -0700
commitb6bccd672282c81c05b20d8d544e65889c60bcd5 (patch)
tree52a3e0f6be4eb701070e3f5b22b5e790dd4d09c5 /spec/unit/provider/user/linux_spec.rb
parent50946c95099276e4cd0bfb209f49f4a639e3a908 (diff)
downloadchef-b6bccd672282c81c05b20d8d544e65889c60bcd5.tar.gz
add func spec for default and fix unit specs
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/provider/user/linux_spec.rb')
-rw-r--r--spec/unit/provider/user/linux_spec.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/unit/provider/user/linux_spec.rb b/spec/unit/provider/user/linux_spec.rb
index eb76b2672e..ac94592859 100644
--- a/spec/unit/provider/user/linux_spec.rb
+++ b/spec/unit/provider/user/linux_spec.rb
@@ -56,16 +56,21 @@ describe Chef::Provider::User::Linux do
end
it "defaults manage_home to true" do
- expect( @new_resource.manage_home ).to be true
+ expect( @new_resource.manage_home ).to be false
end
- it "by default manage_home is true and we do not -M" do
- expect( provider.useradd_options ).to eql(["-m"])
+ it "by default manage_home is false and we use -M" do
+ expect( provider.useradd_options ).to eql(["-M"])
end
it "setting manage_home to false includes -M" do
@new_resource.manage_home false
expect( provider.useradd_options ).to eql(["-M"])
end
+
+ it "setting manage_home to true includes -m" do
+ @new_resource.manage_home true
+ expect( provider.useradd_options ).to eql(["-m"])
+ end
end
end