feature 1508

Not sure these tests ever passed on any platform. Added some mocking to support
the two tests.

Signed-off-by: Andrew Shafer <[EMAIL PROTECTED]>
---
 spec/unit/provider/user/hpux.rb |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/spec/unit/provider/user/hpux.rb b/spec/unit/provider/user/hpux.rb
index 8b31658..4129a7a 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
-- 
1.5.3.7


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to