Add test for new with properties.
This commit is contained in:
parent
a7b8d94599
commit
e5a2af0330
1 changed files with 2 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ my $session = WebGUI::Test->session;
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
plan tests => 50;
|
plan tests => 51;
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# put your tests here
|
# put your tests here
|
||||||
|
|
@ -128,6 +128,7 @@ ok(!$e, 'No exception thrown by create') ||
|
||||||
diag $@;
|
diag $@;
|
||||||
isa_ok($vendor, 'WebGUI::Shop::Vendor', 'create returns correct type of object');
|
isa_ok($vendor, 'WebGUI::Shop::Vendor', 'create returns correct type of object');
|
||||||
WebGUI::Test->addToCleanup($fence);
|
WebGUI::Test->addToCleanup($fence);
|
||||||
|
is $fence->userId, $fenceUser->userId, 'object made with create has properties initialized correctly';
|
||||||
|
|
||||||
$fence->write;
|
$fence->write;
|
||||||
ok($fence->get('dateCreated'), 'dateCreated is not null');
|
ok($fence->get('dateCreated'), 'dateCreated is not null');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue