Lines 1683-1689
subtest 'BorrowersLog tests' => sub {
Link Here
|
1683 |
$schema->storage->txn_rollback; |
1683 |
$schema->storage->txn_rollback; |
1684 |
|
1684 |
|
1685 |
subtest 'Test Koha::Patrons::merge' => sub { |
1685 |
subtest 'Test Koha::Patrons::merge' => sub { |
1686 |
plan tests => 111; |
1686 |
plan tests => 113; |
1687 |
|
1687 |
|
1688 |
my $schema = Koha::Database->new()->schema(); |
1688 |
my $schema = Koha::Database->new()->schema(); |
1689 |
|
1689 |
|
Lines 1729-1734
subtest 'Test Koha::Patrons::merge' => sub {
Link Here
|
1729 |
is( Koha::Patrons->find($loser_2), undef, 'Loser 2 has been deleted' ); |
1729 |
is( Koha::Patrons->find($loser_2), undef, 'Loser 2 has been deleted' ); |
1730 |
is( ref Koha::Patrons->find($anonymous_patron), 'Koha::Patron', 'Anonymous Patron was not deleted' ); |
1730 |
is( ref Koha::Patrons->find($anonymous_patron), 'Koha::Patron', 'Anonymous Patron was not deleted' ); |
1731 |
|
1731 |
|
|
|
1732 |
$anonymous_patron = Koha::Patrons->find($anonymous_patron); |
1733 |
$results = $anonymous_patron->merge_with( [ $keeper->id ] ); |
1734 |
is( $results, undef, "Anonymous patron cannot have other patrons merged into it" ); |
1735 |
is( Koha::Patrons->search( { borrowernumber => $keeper->id } )->count, 1, "Patron from attempted merge with AnonymousPatron still exists" ); |
1736 |
|
1732 |
t::lib::Mocks::mock_preference( 'AnonymousPatron', '' ); |
1737 |
t::lib::Mocks::mock_preference( 'AnonymousPatron', '' ); |
1733 |
$schema->storage->txn_rollback; |
1738 |
$schema->storage->txn_rollback; |
1734 |
}; |
1739 |
}; |
1735 |
- |
|
|