diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-09-04 18:44:28 +0300 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-09-04 18:44:28 +0300 |
commit | f457c344bda44dce9d9eecab49c5d4da1fb2be8f (patch) | |
tree | 45bffa6001c68bade40e0409d7ce7af1b3b5f3d8 | |
parent | c034791b1579be480d565af0c2442849772dce02 (diff) | |
download | chef-f457c344bda44dce9d9eecab49c5d4da1fb2be8f.tar.gz |
Spec updates for dscl changes.
-rw-r--r-- | spec/unit/provider/user/dscl_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/unit/provider/user/dscl_spec.rb b/spec/unit/provider/user/dscl_spec.rb index 3cb18f1979..b272eceada 100644 --- a/spec/unit/provider/user/dscl_spec.rb +++ b/spec/unit/provider/user/dscl_spec.rb @@ -376,6 +376,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30" let(:user_plist_file) { nil } before do + provider.should_receive(:shell_out).with("dscacheutil '-flushcache'") provider.should_receive(:shell_out).with("plutil -convert xml1 -o - /var/db/dslocal/nodes/Default/users/toor.plist") do if user_plist_file.nil? ShellCmdResult.new('Can not find the file', 'Sorry!!', 1) @@ -715,7 +716,6 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30") provider.should_receive(:read_user_info) provider.should_receive(:dscl_set) provider.should_receive(:sleep).with(3) - provider.should_receive(:shell_out).with("dscacheutil '-flushcache'") provider.should_receive(:save_user_info) provider.set_password end @@ -822,6 +822,7 @@ ea18e18b720e358e7fbe3cfbeaa561456f6ba008937a30") describe "when the user exists" do before do + provider.should_receive(:shell_out).with("dscacheutil '-flushcache'") provider.should_receive(:shell_out).with("plutil -convert xml1 -o - /var/db/dslocal/nodes/Default/users/toor.plist") do ShellCmdResult.new(File.read(File.join(CHEF_SPEC_DATA, "mac_users/10.9.plist.xml")), "", 0) end |