Add tests for Article->getStorageLocation, call addToCleanup by classname.

This commit is contained in:
Colin Kuskie 2010-04-06 19:27:38 -07:00
parent ce39ad6a14
commit 45b6f45e4b
2 changed files with 14 additions and 4 deletions

View file

@ -21,4 +21,14 @@ sub list_of_tables {
return [qw/assetData wobject Article/];
}
sub getStorageLocation : Test(2) {
my $test = shift;
my $session = $test->session;
my $asset = $test->class->new({session => $session});
my $storage = $asset->getStorageLocation();
isa_ok $storage, 'WebGUI::Storage';
is $asset->storageId, $storage->getId, 'asset updated with storageId';
WebGUI::Test->addToCleanup($storage);
}
1;