summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-10 14:31:44 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-02-11 08:38:08 +1100
commit012efe359fdaebd738727e42bb9b520ac48fdecf (patch)
tree96c927034202258536adb47f309ee1f073ee8d1e /spec/unit
parenta9f34aff856550e091721ee563d034ba2e1e22bb (diff)
downloadpuppet-012efe359fdaebd738727e42bb9b520ac48fdecf.tar.gz
puppet-012efe359fdaebd738727e42bb9b520ac48fdecf.tar.xz
puppet-012efe359fdaebd738727e42bb9b520ac48fdecf.zip
Fixing #1912 - gid still works with no 'should' value.
This makes 'ralsh' work again with users. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/type/user.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/type/user.rb b/spec/unit/type/user.rb
index 0b1f5f9f7..15a3e2532 100755
--- a/spec/unit/type/user.rb
+++ b/spec/unit/type/user.rb
@@ -186,6 +186,12 @@ describe user do
@gid = user.attrclass(:gid).new(:resource => @resource, :should => %w{foo bar})
end
+ it "should return true if no 'should' values are set" do
+ @gid = user.attrclass(:gid).new(:resource => @resource)
+
+ @gid.must be_insync(500)
+ end
+
it "should return true if any of the specified groups are equal to the current integer" do
Puppet::Util.expects(:gid).with("foo").returns 300
Puppet::Util.expects(:gid).with("bar").returns 500