summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-25 16:00:48 -0500
committerLuke Kanies <luke@madstop.com>2008-05-25 16:00:48 -0500
commit29f5f1b862112179ce1b77ae0177811ab2208aeb (patch)
tree5938a8df29fd6cf8182f6e12f28956ebeff2732c /spec/unit/node
parentfe157f239a301abb52f81c62719355c8e50c970c (diff)
parent7b02f2ba443ba35d7305c24b87028456eaf6bd29 (diff)
Merge branch '0.24.x'
Conflicts: CHANGELOG lib/puppet/transaction.rb
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/catalog.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb
index 59c70b45e..f5f092824 100755
--- a/spec/unit/node/catalog.rb
+++ b/spec/unit/node/catalog.rb
@@ -292,6 +292,26 @@ describe Puppet::Node::Catalog, " when converting to a RAL catalog" do
@catalog.vertices.each { |v| v.catalog.object_id.should equal(@catalog.object_id) }
end
+ it "should convert parser resources to transobjects and set the catalog" do
+ catalog = Puppet::Node::Catalog.new("mynode")
+
+ result = mock 'catalog'
+ result.stub_everything
+
+ Puppet::Node::Catalog.expects(:new).returns result
+
+ trans = mock 'trans'
+ resource = Puppet::Parser::Resource.new(:scope => mock("scope"), :source => mock("source"), :type => :file, :title => "/eh")
+ resource.expects(:to_transobject).returns trans
+ trans.expects(:catalog=).with result
+
+ trans.stub_everything
+
+ catalog.add_resource(resource)
+
+ catalog.to_ral
+ end
+
# This tests #931.
it "should not lose track of resources whose names vary" do
changer = Puppet::TransObject.new 'changer', 'test'