diff options
author | James Turnbull <james@lovedthanlost.net> | 2008-09-06 09:52:26 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-09-06 09:52:26 +1000 |
commit | 0705dfb462b145ac9e4faafc517bbb833f2c81b9 (patch) | |
tree | 6c93fc9e7b6bd513e94a29c2b313258f6a52af7e /spec | |
parent | e15d316cbb9ee33bfbed4b29649f36a97490e985 (diff) | |
download | puppet-0705dfb462b145ac9e4faafc517bbb833f2c81b9.tar.gz puppet-0705dfb462b145ac9e4faafc517bbb833f2c81b9.tar.xz puppet-0705dfb462b145ac9e4faafc517bbb833f2c81b9.zip |
Fixes #1455 - Adds HP-UX support for user type
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/provider/user/hpux.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/unit/provider/user/hpux.rb b/spec/unit/provider/user/hpux.rb new file mode 100755 index 000000000..8b31658b8 --- /dev/null +++ b/spec/unit/provider/user/hpux.rb @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../../../spec_helper' + +provider_class = Puppet::Type.type(:user).provider(:hpuxuseradd) + +describe provider_class do + # left from the useradd test... I have no clue what I'm doing. + before do + @resource = stub("resource", :name => "myuser", :managehome? => nil) + @provider = provider_class.new(@resource) + end + + it "should add -F when modifying a user" do + @resource.stubs(:should).returns "fakeval" + @resource.stubs(:[]).returns "fakeval" + @provider.expects(:execute).with { |args| args.include?("-F") } + + @provider.modify + end + + it "should add -F when deleting a user" do + @resource.stubs(:should).returns "fakeval" + @resource.stubs(:[]).returns "fakeval" + @provider.expects(:execute).with { |args| args.include?("-F") } + + @provider.delete + end +end |