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

(-)a/t/db_dependent/Circulation/ReturnClaims.t (-2 / +24 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::NoWarnings;
20
use Test::NoWarnings;
21
use Test::More tests => 6;
21
use Test::More tests => 7;
22
use Test::MockModule;
22
use Test::MockModule;
23
use Test::Warn;
23
use Test::Warn;
24
24
Lines 115-120 subtest 'Test Koha::Patronn::return_claims' => sub { Link Here
115
    ok( $claim->created_on, "Claim created_on is set" );
115
    ok( $claim->created_on, "Claim created_on is set" );
116
};
116
};
117
117
118
subtest 'Test Koha::Patron::unresolved_return_claims' => sub {
119
    plan tests => 2;
120
121
    my $item      = $builder->build_sample_item;
122
    my $patron    = $builder->build_object( { class => 'Koha::Patrons' } );
123
    my $checkout  = AddIssue( $patron, $item->barcode );
124
    my $librarian = $builder->build_object( { class => 'Koha::Patrons' } );
125
126
    my $claim = $checkout->claim_returned(
127
        {
128
            created_by => $patron->id,
129
            notes      => "Test note",
130
        }
131
    );
132
133
    my $unresolved_claims = $patron->unresolved_return_claims;
134
    is( $unresolved_claims->count, 1, "Got back correct number of unresolved claims" );
135
136
    $claim->resolve( { resolution => "X", resolved_by => $librarian } );
137
    is( $unresolved_claims->count, 0, "Claim is now resolved, so the count is 0" );
138
139
};
140
118
subtest 'Test Koha::Checkout::claim_returned, mark as returned' => sub {
141
subtest 'Test Koha::Checkout::claim_returned, mark as returned' => sub {
119
    plan tests => 8;
142
    plan tests => 8;
120
143
121
- 

Return to bug 25733