summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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$