Lines 1761-1767
subtest 'lock' => sub {
Link Here
|
1761 |
}; |
1761 |
}; |
1762 |
|
1762 |
|
1763 |
subtest 'anonymize' => sub { |
1763 |
subtest 'anonymize' => sub { |
1764 |
plan tests => 9; |
1764 |
plan tests => 10; |
1765 |
|
1765 |
|
1766 |
my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } ); |
1766 |
my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } ); |
1767 |
my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } ); |
1767 |
my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } ); |
Lines 1782-1787
subtest 'anonymize' => sub {
Link Here
|
1782 |
isnt( $patron1->surname, $surname, 'Surname changed' ); |
1782 |
isnt( $patron1->surname, $surname, 'Surname changed' ); |
1783 |
ok( $patron1->surname =~ /^\w{10}$/, 'Mandatory surname randomized' ); |
1783 |
ok( $patron1->surname =~ /^\w{10}$/, 'Mandatory surname randomized' ); |
1784 |
is( $patron1->branchcode, $branchcode, 'Branch code skipped' ); |
1784 |
is( $patron1->branchcode, $branchcode, 'Branch code skipped' ); |
|
|
1785 |
is( $patron1->email, undef, 'Email was mandatory, must be cleared' ); |
1785 |
|
1786 |
|
1786 |
# Test wrapper in Koha::Patrons |
1787 |
# Test wrapper in Koha::Patrons |
1787 |
$patron1->surname($surname)->store; # restore |
1788 |
$patron1->surname($surname)->store; # restore |
1788 |
- |
|
|