summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorAndrew Shafer <andrew@reductivelabs.com>2008-11-27 03:09:03 -0700
committerJames Turnbull <james@lovedthanlost.net>2008-12-01 18:27:00 +1100
commit047e5d073c2362da95553c1778b9eb5176b0c05b (patch)
tree203d559685552a3e764fe97b7fc9ebfdd56de528 /spec/unit
parent88edf66cf8f80b2b35a99854ffa40a29aeafccbb (diff)
downloadpuppet-047e5d073c2362da95553c1778b9eb5176b0c05b.tar.gz
puppet-047e5d073c2362da95553c1778b9eb5176b0c05b.tar.xz
puppet-047e5d073c2362da95553c1778b9eb5176b0c05b.zip
Handle password when user is created
strip out the -p and call password= after the thing is done
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/provider/user/user_role_add.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/provider/user/user_role_add.rb b/spec/unit/provider/user/user_role_add.rb
index ccbda1fb6..49359eb10 100644
--- a/spec/unit/provider/user/user_role_add.rb
+++ b/spec/unit/provider/user/user_role_add.rb
@@ -49,6 +49,10 @@ describe provider_class do
end
describe "when calling create" do
+ before do
+ @provider.stubs(:password=)
+ end
+
it "should use the add command when the user is not a role" do
@provider.stubs(:is_role?).returns(false)
@provider.expects(:addcmd).returns("useradd")
@@ -107,6 +111,7 @@ describe provider_class do
end
it "should add -o when the user is being created" do
+ @provider.stubs(:password=)
@provider.create
end