Lines 434-450
subtest 'add() tests' => sub {
Link Here
|
434 |
sub { |
434 |
sub { |
435 |
|
435 |
|
436 |
if ($extended_attrs_exception) { |
436 |
if ($extended_attrs_exception) { |
437 |
if ( $extended_attrs_exception eq 'Koha::Exceptions::Patron::Attribute::NonRepeatable' |
437 |
if ( $extended_attrs_exception eq 'Koha::Exceptions::Patron::Attribute::NonRepeatable' |
438 |
or $extended_attrs_exception eq 'Koha::Exceptions::Patron::Attribute::UniqueIDConstraint' |
438 |
or $extended_attrs_exception eq 'Koha::Exceptions::Patron::Attribute::UniqueIDConstraint' ) |
439 |
) |
|
|
440 |
{ |
439 |
{ |
441 |
$extended_attrs_exception->throw( |
440 |
$extended_attrs_exception->throw( |
442 |
attribute => Koha::Patron::Attribute->new( |
441 |
attribute => Koha::Patron::Attribute->new( { code => $code, attribute => $attr } ) ); |
443 |
{ code => $code, attribute => $attr } |
442 |
} else { |
444 |
) |
|
|
445 |
); |
446 |
} |
447 |
else { |
448 |
$extended_attrs_exception->throw( type => $type ); |
443 |
$extended_attrs_exception->throw( type => $type ); |
449 |
} |
444 |
} |
450 |
} |
445 |
} |
451 |
- |
|
|