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

(-)a/t/db_dependent/Koha/Old/Checkout.t (-2 / +25 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 1;
20
use Test::More tests => 2;
21
use Test::Exception;
21
use Test::Exception;
22
22
23
use Koha::Database;
23
use Koha::Database;
Lines 80-82 subtest 'anonymize() tests' => sub { Link Here
80
80
81
    $schema->storage->txn_rollback;
81
    $schema->storage->txn_rollback;
82
};
82
};
83
- 
83
84
subtest 'deleteitem() tests' => sub {
85
86
    plan tests => 1;
87
88
    $schema->storage->txn_begin;
89
90
    my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
91
92
    my $checkout_3 = $builder->build_object(
93
        {
94
            class => 'Koha::Old::Checkouts',
95
            value => { borrowernumber => $patron->id }
96
        }
97
    );
98
99
    # delete first checkout
100
    my $item_to_del = $checkout_3->item;
101
    $item_to_del->delete;
102
    $checkout_3->discard_changes();
103
    is( $checkout_3->item, undef, "Item is deleted");
104
105
    $schema->storage->txn_rollback;
106
};

Return to bug 26648