summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-06-06 12:52:25 +0200
committerJames Turnbull <james@lovedthanlost.net>2009-06-11 08:05:36 +1000
commit2945f8d315d265cfb527443cca27d191b7f3d8be (patch)
tree5d451bbac03e553ab70d8c599ab7c48f22a0ba00 /spec
parente142ca656cb5a44005edc9c9d0c767664768362e (diff)
downloadpuppet-2945f8d315d265cfb527443cca27d191b7f3d8be.tar.gz
puppet-2945f8d315d265cfb527443cca27d191b7f3d8be.tar.xz
puppet-2945f8d315d265cfb527443cca27d191b7f3d8be.zip
Make sure overriding a tag also produces a tag
This is so that overriding the "tag" metaparameter ends-up in the resource tags on the server. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/parser/resource.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb
index bdaa05bf6..8005e204c 100755
--- a/spec/unit/parser/resource.rb
+++ b/spec/unit/parser/resource.rb
@@ -332,6 +332,16 @@ describe Puppet::Parser::Resource do
@resource[:testing].should == %w{other testing}
end
+ it "should promote tag overrides to real tags" do
+ @source.stubs(:child_of?).returns true
+ param = Puppet::Parser::Resource::Param.new(:name => :tag, :value => "testing", :source => @resource.source)
+
+ @override.set_parameter(param)
+
+ @resource.merge(@override)
+
+ @resource.tagged?("testing").should be_true
+ end
end