summaryrefslogtreecommitdiffstats
path: root/spec/unit/provider/user/hpux.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/provider/user/hpux.rb')
-rwxr-xr-xspec/unit/provider/user/hpux.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/unit/provider/user/hpux.rb b/spec/unit/provider/user/hpux.rb
index 8b31658b8..4129a7ab6 100755
--- a/spec/unit/provider/user/hpux.rb
+++ b/spec/unit/provider/user/hpux.rb
@@ -7,23 +7,19 @@ 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)
+ @resource = stub("resource", :name => "myuser", :managehome? => nil, :should => "fakeval", :[] => "fakeval")
@provider = provider_class.new(@resource)
end
it "should add -F when modifying a user" do
- @resource.stubs(:should).returns "fakeval"
- @resource.stubs(:[]).returns "fakeval"
+ @resource.expects(:allowdupe?).returns true
@provider.expects(:execute).with { |args| args.include?("-F") }
-
- @provider.modify
+ @provider.uid = 1000
end
it "should add -F when deleting a user" do
- @resource.stubs(:should).returns "fakeval"
- @resource.stubs(:[]).returns "fakeval"
+ @provider.stubs(:exists?).returns(true)
@provider.expects(:execute).with { |args| args.include?("-F") }
-
@provider.delete
end
end