Stubbing out tests for assetId, write.

This commit is contained in:
Colin Kuskie 2010-01-13 10:31:44 -08:00
parent a8f251a5f2
commit d14db689b8

View file

@ -20,7 +20,7 @@ use Test::More;
use Test::Deep;
use Test::Exception;
plan tests => 29;
plan tests => 31;
my $session = WebGUI::Test->session;
@ -48,10 +48,16 @@ my $session = WebGUI::Test->session;
is $asset->get('title'), $asset->title, '... get(title) works';
is $asset->menuTitle, 'Untitled', 'menuTitle: default is untitled';
}
{
note "assetId, getId";
my $asset = WebGUI::Asset->new({session => $session, });
can_ok $asset, qw/assetId getId/;
ok $session->id->valid( $asset->assetId), 'assetId generated by default is valid';
is $asset->assetId, $asset->getId, '... getId is an alias for assetId';
my $asset2 = WebGUI::Asset->new({ session => $session, assetId => '' });
}
{
@ -145,3 +151,8 @@ my $session = WebGUI::Test->session;
note "uiLevel";
is +WebGUI::Asset->meta->uiLevel, 1, 'uiLevel: default for assets is 1';
}
{
note "write";
is +WebGUI::Asset->meta->uiLevel, 1, 'uiLevel: default for assets is 1';
}