View | Details | Raw Unified | Return to bug 34887
Collapse All | Expand All

(-)a/t/db_dependent/Koha/Patron.t (-1 / +9 lines)
Lines 1172-1177 subtest 'safe_to_delete() tests' => sub { Link Here
1172
    ok( $patron->safe_to_delete, 'Can delete, all conditions met' );
1172
    ok( $patron->safe_to_delete, 'Can delete, all conditions met' );
1173
    my $messages = $patron->safe_to_delete->messages;
1173
    my $messages = $patron->safe_to_delete->messages;
1174
    is_deeply( $messages, [], 'Patron can be deleted, no messages' );
1174
    is_deeply( $messages, [], 'Patron can be deleted, no messages' );
1175
1176
    $schema->storage->txn_rollback;
1175
};
1177
};
1176
1178
1177
subtest 'article_request_fee() tests' => sub {
1179
subtest 'article_request_fee() tests' => sub {
Lines 1446-1451 subtest 'notify_library_of_registration()' => sub { Link Here
1446
1448
1447
subtest 'notice_email_address' => sub {
1449
subtest 'notice_email_address' => sub {
1448
    plan tests => 2;
1450
    plan tests => 2;
1451
    $schema->storage->txn_begin;
1449
1452
1450
    my $patron = $builder->build_object({ class => 'Koha::Patrons' });
1453
    my $patron = $builder->build_object({ class => 'Koha::Patrons' });
1451
1454
Lines 1457-1466 subtest 'notice_email_address' => sub { Link Here
1457
    is ($patron->notice_email_address, $patron->emailpro, "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is emailpro");
1460
    is ($patron->notice_email_address, $patron->emailpro, "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is emailpro");
1458
1461
1459
    $patron->delete;
1462
    $patron->delete;
1463
    $schema->storage->txn_rollback;
1460
};
1464
};
1461
1465
1462
subtest 'first_valid_email_address' => sub {
1466
subtest 'first_valid_email_address' => sub {
1463
    plan tests => 1;
1467
    plan tests => 1;
1468
    $schema->storage->txn_begin;
1464
1469
1465
    my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { emailpro => ''}});
1470
    my $patron = $builder->build_object({ class => 'Koha::Patrons', value => { emailpro => ''}});
1466
1471
Lines 1468-1473 subtest 'first_valid_email_address' => sub { Link Here
1468
    is ($patron->first_valid_email_address, $patron->email, "Koha::Patron->first_valid_email_address returns correct value when EmailFieldPrecedence is 'emailpro|email' and emailpro is empty");
1473
    is ($patron->first_valid_email_address, $patron->email, "Koha::Patron->first_valid_email_address returns correct value when EmailFieldPrecedence is 'emailpro|email' and emailpro is empty");
1469
1474
1470
    $patron->delete;
1475
    $patron->delete;
1476
    $schema->storage->txn_rollback;
1471
};
1477
};
1472
1478
1473
subtest 'get_savings tests' => sub {
1479
subtest 'get_savings tests' => sub {
Lines 1519-1524 subtest 'get_savings tests' => sub { Link Here
1519
};
1525
};
1520
1526
1521
subtest 'update privacy tests' => sub {
1527
subtest 'update privacy tests' => sub {
1528
    $schema->storage->txn_begin;
1522
1529
1523
    plan tests => 5;
1530
    plan tests => 5;
1524
1531
Lines 1548-1551 subtest 'update privacy tests' => sub { Link Here
1548
1555
1549
    is( $old_checkout->borrowernumber, $anon_patron->id, "Checkout is successfully anonymized");
1556
    is( $old_checkout->borrowernumber, $anon_patron->id, "Checkout is successfully anonymized");
1550
    is( $patron->privacy(), 2, "Patron privacy is successfully updated");
1557
    is( $patron->privacy(), 2, "Patron privacy is successfully updated");
1558
1559
    $schema->storage->txn_rollback;
1551
};
1560
};
1552
- 

Return to bug 34887