diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-10-17 22:45:57 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-10-17 22:45:57 +0000 |
| commit | 1d35f2822aaa673cb6f3ea6da9c773b89ccb25ee (patch) | |
| tree | e081bef0d4954d24517e4a1d0ccd76ef2dc847e0 /test | |
| parent | ada77773591f5e17ddcdb4af6c20ded3715ecda9 (diff) | |
| download | puppet-1d35f2822aaa673cb6f3ea6da9c773b89ccb25ee.tar.gz puppet-1d35f2822aaa673cb6f3ea6da9c773b89ccb25ee.tar.xz puppet-1d35f2822aaa673cb6f3ea6da9c773b89ccb25ee.zip | |
Fixing a bug that only occurred if a defined resource was already defined in memory.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1803 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rwxr-xr-x | test/types/type.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/types/type.rb b/test/types/type.rb index 2add25db3..2438503c8 100755 --- a/test/types/type.rb +++ b/test/types/type.rb @@ -784,6 +784,20 @@ end assert(hash[param], "Hash did not include %s" % param) end end + + # Make sure that classes behave like hashes. + def test_class_hash_behaviour + path = tempfile() + + filetype = Puppet::Type.type(:file) + one = Puppet::Type.newfile :path => path + + assert_equal(one, filetype[path], "Did not get file back") + + assert_raise(Puppet::Error) do + filetype[path] = one + end + end end # $Id$ |
