summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick McSpadden <nmcspadden@gmail.com>2018-05-15 00:14:16 -0700
committerNick McSpadden <nmcspadden@gmail.com>2018-05-15 00:14:16 -0700
commite83674cd811f9bd00a902a4b5d656053cb793837 (patch)
tree16aba5ebc2d807e9c5edd7a021eabf0d270c624a
parentc935ce85f591e53f2f200e55cb252185e1801387 (diff)
downloadchef-e83674cd811f9bd00a902a4b5d656053cb793837.tar.gz
Updating spec test
-rw-r--r--spec/unit/provider/user/dscl_spec.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/spec/unit/provider/user/dscl_spec.rb b/spec/unit/provider/user/dscl_spec.rb
index 956c32664d..3f828b3072 100644
--- a/spec/unit/provider/user/dscl_spec.rb
+++ b/spec/unit/provider/user/dscl_spec.rb
@@ -283,15 +283,8 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30"
provider.dscl_set_home
end
- it "should raise an exception when the systems user template dir (skel) cannot be found" do
- allow(::File).to receive(:exist?).and_return(false, false, false)
- expect { provider.dscl_set_home }.to raise_error(Chef::Exceptions::User)
- end
-
- it "should run ditto to copy any missing files from skel to the new home dir" do
- expect(::File).to receive(:exist?).with("/System/Library/User\ Template/English.lproj").and_return(true)
- expect(FileUtils).to receive(:chown_R).with("toor", "", "/Users/toor")
- expect(provider).to receive(:shell_out!).with("ditto", "/System/Library/User Template/English.lproj", "/Users/toor")
+ it "should run createhomedir to create the user's new home folder" do
+ expect(provider).to receive(:shell_out!).with("createhomedir", "-c", "-u", "toor")
provider.ditto_home
end