summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-07-09 10:29:45 -0500
committerLuke Kanies <luke@madstop.com>2008-07-09 10:29:45 -0500
commitd25c2b282cc4cd703bba3d2457f93431098ddc85 (patch)
treee6b18045f55253a3c2cb15960336bdb4a9a5b91a /spec
parent9eb9affe11b4dbe69c7cd55aff28f39dffde27e8 (diff)
downloadpuppet-d25c2b282cc4cd703bba3d2457f93431098ddc85.tar.gz
puppet-d25c2b282cc4cd703bba3d2457f93431098ddc85.tar.xz
puppet-d25c2b282cc4cd703bba3d2457f93431098ddc85.zip
Fixed #1407 - allowdupe is now a boolean group parameter.
This just fixes a regression. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/type/group.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/unit/type/group.rb b/spec/unit/type/group.rb
new file mode 100755
index 000000000..d7e06dcd8
--- /dev/null
+++ b/spec/unit/type/group.rb
@@ -0,0 +1,40 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+describe Puppet::Type.type(:group) do
+ before do
+ @class = Puppet::Type.type(:group)
+ end
+
+ after do
+ @class.clear
+ end
+
+ it "should have a default provider" do
+ @class.defaultprovider.should_not be_nil
+ end
+
+ it "should have a default provider inheriting from Puppet::Provider" do
+ @class.defaultprovider.ancestors.should be_include(Puppet::Provider)
+ end
+
+ describe "when validating attributes" do
+ [:name, :allowdupe].each do |param|
+ it "should have a #{param} parameter" do
+ @class.attrtype(param).should == :param
+ end
+ end
+
+ [:ensure, :gid].each do |param|
+ it "should have a #{param} property" do
+ @class.attrtype(param).should == :property
+ end
+ end
+ end
+
+ # #1407 - we need to declare the allowdupe param as boolean.
+ it "should have a boolean method for determining if duplicates are allowed" do
+ @class.create(:name => "foo").methods.should be_include("allowdupe?")
+ end
+end