summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser')
-rwxr-xr-xspec/unit/parser/resource.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb
index 648f3a6b4..410494d43 100755
--- a/spec/unit/parser/resource.rb
+++ b/spec/unit/parser/resource.rb
@@ -195,6 +195,15 @@ describe Puppet::Parser::Resource do
@resource["require"].sort.should == %w{container resource}
end
+ it "should not stack relationship metaparams that are set to 'undef'" do
+ @resource.set_parameter("require", :undef)
+ @scope.setvar("require", "container")
+
+ @resource.class.publicize_methods(:add_metaparams) { @resource.add_metaparams }
+
+ @resource["require"].should == :undef
+ end
+
it "should flatten the array resulting from stacking relationship metaparams" do
@resource.set_parameter("require", ["resource1", "resource2"])
@scope.setvar("require", %w{container1 container2})