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

(-)a/t/db_dependent/Reserves.t (-2 / +44 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 70;
20
use Test::More tests => 71;
21
use Test::NoWarnings;
21
use Test::NoWarnings;
22
use Test::MockModule;
22
use Test::MockModule;
23
use Test::Warn;
23
use Test::Warn;
Lines 1581-1586 subtest 'AddReserve() tests' => sub { Link Here
1581
    $schema->storage->txn_rollback;
1581
    $schema->storage->txn_rollback;
1582
};
1582
};
1583
1583
1584
subtest 'ModReserve() tests' => sub {
1585
1586
    plan tests => 1;
1587
1588
    $schema->storage->txn_begin;
1589
1590
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
1591
    my $patron  = $builder->build_object( { class => 'Koha::Patrons', value => { lastseen => undef } } );
1592
    my $biblio  = $builder->build_sample_biblio;
1593
1594
    my $reserve_id = AddReserve(
1595
        {
1596
            branchcode     => $library->branchcode,
1597
            borrowernumber => $patron->id,
1598
            biblionumber   => $biblio->id,
1599
        }
1600
    );
1601
1602
    my $hold = Koha::Holds->find($reserve_id);
1603
1604
    ModReserve(
1605
        {
1606
            branchcode      => $reserve_id,
1607
            expiration_date => '2040-04-02',
1608
        }
1609
    );
1610
1611
    $hold = Koha::Holds->find($reserve_id);
1612
    is( $hold->expirationdate, '2040-04-02', 'Successfully updated expiration date' );
1613
1614
    ModReserve(
1615
        {
1616
            branchcode             => $reserve_id,
1617
            patron_expiration_date => '2040-04-02'
1618
        }
1619
    );
1620
1621
    $hold = Koha::Holds->find($reserve_id);
1622
    is( $hold->patron_expiration_date, '2040-04-02', 'Successfully updated patron expiration date' );
1623
1624
    $schema->storage->txn_rollback;
1625
};
1626
1584
subtest 'AlterPriorty() tests' => sub {
1627
subtest 'AlterPriorty() tests' => sub {
1585
1628
1586
    plan tests => 2;
1629
    plan tests => 2;
1587
- 

Return to bug 39419