summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/functional/resource/user/useradd_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/functional/resource/user/useradd_spec.rb b/spec/functional/resource/user/useradd_spec.rb
index d58247412f..f01295586e 100644
--- a/spec/functional/resource/user/useradd_spec.rb
+++ b/spec/functional/resource/user/useradd_spec.rb
@@ -81,12 +81,11 @@ describe Chef::Provider::User::Useradd, metadata do
['/home/foo', '/home/bar'].each do |f|
shell_out("rm", "-r", f)
end
+
['cf-test'].each do |u|
- if RUBY_PLATFORM =~ /freebsd/
- shell_out("pw", "userdel", "-r", username)
- else
- shell_out("userdel", "-r", username)
- end
+ r = Chef::Resource::User.new("DELETE USER", run_context)
+ r.username('cf-test')
+ r.run_action(:remove)
end
end