Test default label handling.
This commit is contained in:
parent
ee1e896ef8
commit
be35b8afe4
2 changed files with 24 additions and 2 deletions
|
|
@ -133,6 +133,20 @@ is (WebGUI::Shop::PayDriver->getName($session), 'Payment Driver', 'getName retur
|
|||
|
||||
can_ok $driver, qw/get set update write getName className label enabled paymentGatewayId groupToUse/;
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# default label
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
$driver->label('');
|
||||
is $driver->label, $driver->getName($session), 'empty label replaced with plugin name';
|
||||
$driver->label('untitled');
|
||||
is $driver->label, $driver->getName($session), 'label=untitled replaced with plugin name';
|
||||
$driver->label('uNtItLeD');
|
||||
is $driver->label, $driver->getName($session), '...regardless of case';
|
||||
$driver->label('Fast and harmless');
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# get
|
||||
|
|
@ -147,7 +161,6 @@ cmp_deeply(
|
|||
%{ $options },
|
||||
paymentGatewayId => ignore(),
|
||||
},
|
||||
$options,
|
||||
'get works like the options method with no param passed'
|
||||
);
|
||||
is ($driver->get('label'), 'Fast and harmless', 'get the label entry from the options');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue