summaryrefslogtreecommitdiffstats
path: root/spec/unit/node/configuration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/node/configuration.rb')
-rwxr-xr-xspec/unit/node/configuration.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/node/configuration.rb b/spec/unit/node/configuration.rb
index 0a8b47fc5..0023e0f2b 100755
--- a/spec/unit/node/configuration.rb
+++ b/spec/unit/node/configuration.rb
@@ -351,6 +351,18 @@ describe Puppet::Node::Configuration, " when functioning as a resource container
@config.vertices.find { |r| r.ref == @one.ref }.should equal(@one)
end
+ it "should canonize how resources are referred to during retrieval when both type and title are provided" do
+ @config.add_resource(@one)
+
+ @config.resource("me", "one").should equal(@one)
+ end
+
+ it "should canonize how resources are referred to during retrieval when just the title is provided" do
+ @config.add_resource(@one)
+
+ @config.resource("me[one]", nil).should equal(@one)
+ end
+
it "should not allow two resources with the same resource reference" do
@config.add_resource(@one)
proc { @config.add_resource(@dupe) }.should raise_error(ArgumentError)