From 21410a2152d03d8a7f52bebcdf52666e77a0dbfa Mon Sep 17 00:00:00 2001 From: luke Date: Thu, 12 Jan 2006 03:20:29 +0000 Subject: Fixing documentation generation, and fixing aliasing so that objects can safely be aliased to themselves git-svn-id: https://reductivelabs.com/svn/puppet/trunk@807 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/types/type.rb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/types/type.rb b/test/types/type.rb index 6271fa43c..7a95e2574 100644 --- a/test/types/type.rb +++ b/test/types/type.rb @@ -135,11 +135,19 @@ class TestType < Test::Unit::TestCase def test_aliasing file = tempfile() - baseobj = Puppet.type(:file).create( - :name => file, - :create => true, - :alias => "funtest" - ) + baseobj = nil + assert_nothing_raised { + baseobj = Puppet.type(:file).create( + :name => file, + :create => true, + :alias => ["funtest"] + ) + } + + # Verify we adding ourselves as an alias isn't an error. + assert_nothing_raised { + baseobj[:alias] = file + } assert_instance_of(Puppet.type(:file), Puppet.type(:file)["funtest"], "Could not retrieve alias") -- cgit