summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-27 22:53:12 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-27 22:53:12 +0000
commitf6a3d94fc69e98c812e732f473b77bb34c55faeb (patch)
treee7998900285e5858b67125007cdfc9f833309511
parent81025d1004f08fee26fa0766da2a87420ba7b971 (diff)
downloadpuppet-f6a3d94fc69e98c812e732f473b77bb34c55faeb.tar.gz
puppet-f6a3d94fc69e98c812e732f473b77bb34c55faeb.tar.xz
puppet-f6a3d94fc69e98c812e732f473b77bb34c55faeb.zip
Fixing #455. A simple fix, fortunately.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2101 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-xlib/puppet/type/user.rb4
-rwxr-xr-xtest/types/user.rb9
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index 4fb1d02cd..952524826 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -364,8 +364,8 @@ module Puppet
}
end
- if @states.include?(:groups) and groups = @states[:groups].should.split(",")
- autos += groups
+ if @states.include?(:groups) and groups = @states[:groups].should
+ autos += groups.split(",")
end
autos
diff --git a/test/types/user.rb b/test/types/user.rb
index 41231a687..485ce1c38 100755
--- a/test/types/user.rb
+++ b/test/types/user.rb
@@ -446,6 +446,15 @@ class TestUser < Test::Unit::TestCase
user[:ensure] = :absent
assert_apply(user)
end
+
+ # Testing #455
+ def test_autorequire_with_no_group_should
+ user = Puppet::Type.type(:user).create(:name => "user", :check => :all)
+
+ assert_nothing_raised do
+ user.autorequire
+ end
+ end
end
# $Id$