summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-01-12 03:20:29 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-01-12 03:20:29 +0000
commit21410a2152d03d8a7f52bebcdf52666e77a0dbfa (patch)
tree53ecc3ac66e46372ce36c90be5fb31d7a5f23872 /test
parent29b00fb744d2e27f835d0130b88ed4bda08c63f7 (diff)
downloadpuppet-21410a2152d03d8a7f52bebcdf52666e77a0dbfa.tar.gz
puppet-21410a2152d03d8a7f52bebcdf52666e77a0dbfa.tar.xz
puppet-21410a2152d03d8a7f52bebcdf52666e77a0dbfa.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/types/type.rb18
1 files changed, 13 insertions, 5 deletions
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")