Lines 1692-1698
subtest 'BorrowersLog tests' => sub {
Link Here
|
1692 |
$schema->storage->txn_rollback; |
1692 |
$schema->storage->txn_rollback; |
1693 |
|
1693 |
|
1694 |
subtest 'Test Koha::Patrons::merge' => sub { |
1694 |
subtest 'Test Koha::Patrons::merge' => sub { |
1695 |
plan tests => 111; |
1695 |
plan tests => 113; |
1696 |
|
1696 |
|
1697 |
my $schema = Koha::Database->new()->schema(); |
1697 |
my $schema = Koha::Database->new()->schema(); |
1698 |
|
1698 |
|
Lines 1738-1743
subtest 'Test Koha::Patrons::merge' => sub {
Link Here
|
1738 |
is( Koha::Patrons->find($loser_2), undef, 'Loser 2 has been deleted' ); |
1738 |
is( Koha::Patrons->find($loser_2), undef, 'Loser 2 has been deleted' ); |
1739 |
is( ref Koha::Patrons->find($anonymous_patron), 'Koha::Patron', 'Anonymous Patron was not deleted' ); |
1739 |
is( ref Koha::Patrons->find($anonymous_patron), 'Koha::Patron', 'Anonymous Patron was not deleted' ); |
1740 |
|
1740 |
|
|
|
1741 |
$anonymous_patron = Koha::Patrons->find($anonymous_patron); |
1742 |
$results = $anonymous_patron->merge_with( [ $keeper->id ] ); |
1743 |
is( $results, undef, "Anonymous patron cannot have other patrons merged into it" ); |
1744 |
is( Koha::Patrons->search( { borrowernumber => $keeper->id } )->count, 1, "Patron from attempted merge with AnonymousPatron still exists" ); |
1745 |
|
1741 |
t::lib::Mocks::mock_preference( 'AnonymousPatron', '' ); |
1746 |
t::lib::Mocks::mock_preference( 'AnonymousPatron', '' ); |
1742 |
$schema->storage->txn_rollback; |
1747 |
$schema->storage->txn_rollback; |
1743 |
}; |
1748 |
}; |
1744 |
- |
|
|