diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-11 15:30:19 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-11 15:30:19 +0000 |
| commit | 4d750418d00bdd39118493003d60481a35212ed1 (patch) | |
| tree | 4b2e74ff66e9a0f5f2a69529986595c2dcccc95f /test | |
| parent | 201aa023dd279d2d968a97732db11a1933665562 (diff) | |
Adding a "tag" metaparam
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1099 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rw-r--r-- | test/tagging/tagging.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/tagging/tagging.rb b/test/tagging/tagging.rb index 312016792..434ef6e69 100644 --- a/test/tagging/tagging.rb +++ b/test/tagging/tagging.rb @@ -141,6 +141,39 @@ class TestTagging < Test::Unit::TestCase File.unlink(a) end + + def test_metaparamtag + path = tempfile() + + start = %w{some tags} + tags = %w{a list of tags} + + obj = nil + assert_nothing_raised do + obj = Puppet.type(:file).create( + :path => path, + :ensure => "file", + :tag => start + ) + end + + + assert(obj, "Did not make object") + + start.each do |tag| + assert(obj.tagged?(tag), "Object was not tagged with %s" % tag) + end + + tags.each do |tag| + assert_nothing_raised { + obj[:tag] = tag + } + end + + tags.each do |tag| + assert(obj.tagged?(tag), "Object was not tagged with %s" % tag) + end + end end # $Id$ |
