Lines 1581-1587
subtest 'lock' => sub {
Link Here
|
1581 |
}; |
1581 |
}; |
1582 |
|
1582 |
|
1583 |
subtest 'anonymize' => sub { |
1583 |
subtest 'anonymize' => sub { |
1584 |
plan tests => 9; |
1584 |
plan tests => 10; |
1585 |
|
1585 |
|
1586 |
my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } ); |
1586 |
my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } ); |
1587 |
my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } ); |
1587 |
my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } ); |
Lines 1602-1607
subtest 'anonymize' => sub {
Link Here
|
1602 |
isnt( $patron1->surname, $surname, 'Surname changed' ); |
1602 |
isnt( $patron1->surname, $surname, 'Surname changed' ); |
1603 |
ok( $patron1->surname =~ /^\w{10}$/, 'Mandatory surname randomized' ); |
1603 |
ok( $patron1->surname =~ /^\w{10}$/, 'Mandatory surname randomized' ); |
1604 |
is( $patron1->branchcode, $branchcode, 'Branch code skipped' ); |
1604 |
is( $patron1->branchcode, $branchcode, 'Branch code skipped' ); |
|
|
1605 |
is( $patron1->email, undef, 'Email was mandatory, must be cleared' ); |
1605 |
|
1606 |
|
1606 |
# Test wrapper in Koha::Patrons |
1607 |
# Test wrapper in Koha::Patrons |
1607 |
$patron1->surname($surname)->store; # restore |
1608 |
$patron1->surname($surname)->store; # restore |
1608 |
- |
|
|