summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
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")