summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/resource.rb')
-rwxr-xr-xspec/unit/parser/resource.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb
index 410494d43..92699e040 100755
--- a/spec/unit/parser/resource.rb
+++ b/spec/unit/parser/resource.rb
@@ -425,5 +425,13 @@ describe Puppet::Parser::Resource do
result = @parser_resource.to_resource
result[:fee].should == ["a", Puppet::Resource::Reference.new(:file, "/my/file")]
end
+
+ it "should convert any parser resource references to Puppet::Resource::Reference instances even if they are in an array of array, and even deeper" do
+ ref1 = Puppet::Parser::Resource::Reference.new(:title => "/my/file1", :type => "file")
+ ref2 = Puppet::Parser::Resource::Reference.new(:title => "/my/file2", :type => "file")
+ @parser_resource = mkresource :source => @source, :params => {:foo => "bar", :fee => ["a", [ref1,ref2]]}
+ result = @parser_resource.to_resource
+ result[:fee].should == ["a", Puppet::Resource::Reference.new(:file, "/my/file1"), Puppet::Resource::Reference.new(:file, "/my/file2")]
+ end
end
end