summaryrefslogtreecommitdiffstats
path: root/spec/unit/node/catalog.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/node/catalog.rb')
-rwxr-xr-xspec/unit/node/catalog.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb
index 42a156286..c986fc24e 100755
--- a/spec/unit/node/catalog.rb
+++ b/spec/unit/node/catalog.rb
@@ -492,7 +492,12 @@ describe Puppet::Node::Catalog, " when functioning as a resource container" do
@catalog.resource("me", "other").should equal(@one)
end
- it "should fail to add an alias if the aliased name already exists as a resource" do
+ it "should ignore conflicting aliases that point to the aliased resource" do
+ @catalog.alias(@one, "other")
+ lambda { @catalog.alias(@one, "other") }.should_not raise_error
+ end
+
+ it "should fail to add an alias if the aliased name already exists" do
@catalog.add_resource @one
proc { @catalog.alias @two, "one" }.should raise_error(ArgumentError)
end