summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-11-26 00:44:47 -0600
committerJames Turnbull <james@lovedthanlost.net>2008-11-26 20:30:40 +1100
commit5742966d79206cb5f26cc61c20b065df876f540e (patch)
treee4bf649fc90a56e4872521ac5fd499ca0763c800 /spec/unit
parent31ec3e64f3acaec36f3bddc6078f6ddd0d7efbf7 (diff)
downloadpuppet-5742966d79206cb5f26cc61c20b065df876f540e.tar.gz
puppet-5742966d79206cb5f26cc61c20b065df876f540e.tar.xz
puppet-5742966d79206cb5f26cc61c20b065df876f540e.zip
Fixing #1743 - defined types get catalogs too.
I wasn't adding the catalog to the defined types when creating the transportable objects. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/other/transobject.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/unit/other/transobject.rb b/spec/unit/other/transobject.rb
index 07ffdf8bd..33de72c74 100755
--- a/spec/unit/other/transobject.rb
+++ b/spec/unit/other/transobject.rb
@@ -77,9 +77,15 @@ describe Puppet::TransObject, " when converting to a RAL component instance" do
@resource.to_component.should == :yay
end
+ it "should copy over the catalog" do
+ @resource.catalog = "mycat"
+ Puppet::Type::Component.expects(:create).with { |resource| resource.catalog == "mycat" }.returns(:yay)
+ @resource.to_component
+ end
+
# LAK:FIXME This really isn't the design we want going forward, but it's
# good enough for now.
- it "should not pass resource paramaters that are not metaparams" do
+ it "should not pass resource parameters that are not metaparams" do
Puppet::Type::Component.expects(:create).with { |resource| resource["one"].nil? }.returns(:yay)
@resource.to_component.should == :yay
end