summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-10 14:25:22 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-02-11 08:35:11 +1100
commitdb05c00af042cce1f09640071706efbc82742a01 (patch)
tree06f517aa5348537c368ebb770a5c45801167292b /spec/unit
parentaa219e76b15a543c0091b83efbb13a711d657287 (diff)
Fixing #1920 - user passwords no longer allow ':'
I wanted to include a snide remark in the error, but... Now you just get an exception when creating the user if the password includes this character. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/type/user.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/type/user.rb b/spec/unit/type/user.rb
index de04371ed..0b1f5f9f7 100755
--- a/spec/unit/type/user.rb
+++ b/spec/unit/type/user.rb
@@ -40,6 +40,10 @@ describe user do
it "should have a valid provider" do
user.create(:name => "foo").provider.class.ancestors.should be_include(Puppet::Provider)
end
+
+ it "should fail if a ':' is included in the password" do
+ lambda { user.create(:name => "foo", :password => 'some:thing') }.should raise_error(Puppet::Error)
+ end
end
properties = [:ensure, :uid, :gid, :home, :comment, :shell, :password, :groups, :roles, :auths, :profiles, :project, :keys]