diff options
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/type/user_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/type/user_spec.rb b/spec/unit/type/user_spec.rb index 5a84af443..594802c6e 100755 --- a/spec/unit/type/user_spec.rb +++ b/spec/unit/type/user_spec.rb @@ -290,6 +290,14 @@ describe user do @password.change_to_s("other", "mypass").should_not be_include("mypass") end + it "should redact the password when displaying the old value" do + @password.is_to_s("currentpassword").should =~ /^\[old password hash redacted\]$/ + end + + it "should redact the password when displaying the new value" do + @password.should_to_s("newpassword").should =~ /^\[new password hash redacted\]$/ + end + it "should fail if a ':' is included in the password" do lambda { @password.should = "some:thing" }.should raise_error(Puppet::Error) end |
