Fix failing Shop/ShipDriver.t tests. If the definition sub, fields was

changed to properties, and getName is now a class method that requires
a session variable.
This commit is contained in:
Colin Kuskie 2008-03-09 04:33:24 +00:00
parent e4d76f0b3b
commit 7990e0cc38

View file

@ -72,7 +72,7 @@ cmp_deeply(
$definition,
[ {
name => 'Shipper Driver',
fields => {
properties => {
label => {
fieldType => 'text',
label => ignore(),
@ -101,7 +101,7 @@ cmp_deeply(
},
{
name => 'Shipper Driver',
fields => ignore(),
properties => ignore(),
}
],
,
@ -170,7 +170,6 @@ is($driver->className, ref $driver, 'className property set correctly');
cmp_deeply($driver->options, $options, 'options accessor works');
my $dbData = $session->db->quickHashRef('select * from shipper where shipperId=?',[$driver->shipperId]);
diag $driver->shipperId;
cmp_deeply(
$dbData,
{
@ -187,7 +186,7 @@ cmp_deeply(
#
#######################################################################
is ($driver->getName, 'Shipper Driver', 'getName returns the human readable name of this driver');
is (WebGUI::Shop::ShipDriver->getName($session), 'Shipper Driver', 'getName returns the human readable name of this driver');
#######################################################################
#