This just fixes a regression.

Signed-off-by: Luke Kanies <[EMAIL PROTECTED]>
---
 lib/puppet/type/group.rb |    2 +-
 spec/unit/type/group.rb  |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletions(-)
 create mode 100755 spec/unit/type/group.rb

diff --git a/lib/puppet/type/group.rb b/lib/puppet/type/group.rb
index 36a4d49..2a5ac30 100755
--- a/lib/puppet/type/group.rb
+++ b/lib/puppet/type/group.rb
@@ -110,7 +110,7 @@ module Puppet
             isnamevar
         end
 
-        newparam(:allowdupe) do
+        newparam(:allowdupe, :boolean => true) do
             desc "Whether to allow duplicate GIDs.  This option does not work 
on
                 FreeBSD (contract to the ``pw`` man page)."
                 
diff --git a/spec/unit/type/group.rb b/spec/unit/type/group.rb
new file mode 100755
index 0000000..d7e06dc
--- /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
-- 
1.5.3.7


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to