diff options
author | Thom May <thom@may.lt> | 2018-05-17 12:22:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-17 12:22:29 +0100 |
commit | adcae56ec81b5c4f1d80329a59a45c72db701b02 (patch) | |
tree | ef155d7913f8d9121a583841b99781dfbc9d569c /spec/unit/provider | |
parent | a074d491722bf665da843e76672ffbadf92e3661 (diff) | |
parent | 2c9a6248d51de056719df546272a7b27cb590e95 (diff) | |
download | chef-adcae56ec81b5c4f1d80329a59a45c72db701b02.tar.gz |
Merge pull request #4903 from nmcspadden/mac_uid
UID now starts at 501, uses createhomedir instead
Diffstat (limited to 'spec/unit/provider')
-rw-r--r-- | spec/unit/provider/user/dscl_spec.rb | 11 |
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..1019a9ae0f 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("/usr/sbin/createhomedir", "-c", "-u", "toor") provider.ditto_home end |