Signed-off-by: Nigel Kersten <[email protected]>
---
spec/unit/type/file/group.rb | 5 +++++
spec/unit/type/file/owner.rb | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/spec/unit/type/file/group.rb b/spec/unit/type/file/group.rb
index 856b05b..93d09ad 100755
--- a/spec/unit/type/file/group.rb
+++ b/spec/unit/type/file/group.rb
@@ -70,6 +70,11 @@ describe property do
@group.must be_insync(10)
end
+
+ it "should not validate that groups exist when a group is specified as
an integer" do
+ @group.expects(:gid).never
+ @group.validgroup?(10)
+ end
it "should fail if it cannot convert a group name to an integer" do
@group.expects(:gid).with("foo").returns nil
diff --git a/spec/unit/type/file/owner.rb b/spec/unit/type/file/owner.rb
index 743e640..1ea01cb 100755
--- a/spec/unit/type/file/owner.rb
+++ b/spec/unit/type/file/owner.rb
@@ -83,6 +83,11 @@ describe property do
@owner.must be_insync(10)
end
+
+ it "should not validate that users exist when a user is specified as
an integer" do
+ @owner.expects(:uid).never
+ @owner.validuser?(10)
+ end
it "should fail if it cannot convert an owner name to an integer" do
@owner.expects(:uid).with("foo").returns nil
--
1.6.3
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---