Bugzilla – Attachment 168680 Details for
Bug 25733
Return claims attention can't be cleared
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25733: Unit tests
Bug-25733-Unit-tests.patch (text/plain), 1.76 KB, created by
Sam Lau
on 2024-07-09 18:29:23 UTC
(
hide
)
Description:
Bug 25733: Unit tests
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2024-07-09 18:29:23 UTC
Size:
1.76 KB
patch
obsolete
>From eb9ba8ea664a05aaae3d8b3e39e0d4f07878c330 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Tue, 9 Jul 2024 18:27:05 +0000 >Subject: [PATCH] Bug 25733: Unit tests > >prove t/db_dependent/Circulation/ReturnClaims.t >--- > t/db_dependent/Circulation/ReturnClaims.t | 25 ++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation/ReturnClaims.t b/t/db_dependent/Circulation/ReturnClaims.t >index 6fb1c8d176..c0298c245c 100755 >--- a/t/db_dependent/Circulation/ReturnClaims.t >+++ b/t/db_dependent/Circulation/ReturnClaims.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 3; >+use Test::More tests => 4; > use Test::MockModule; > use Test::Warn; > >@@ -114,6 +114,29 @@ subtest 'Test Koha::Patronn::return_claims' => sub { > ok( $claim->created_on, "Claim created_on is set" ); > }; > >+subtest 'Test Koha::Patron::unresolved_return_claims' => sub { >+ plan tests => 2; >+ >+ my $item = $builder->build_sample_item; >+ my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $checkout = AddIssue( $patron, $item->barcode ); >+ my $librarian = $builder->build_object( { class => 'Koha::Patrons' } ); >+ >+ my $claim = $checkout->claim_returned( >+ { >+ created_by => $patron->id, >+ notes => "Test note", >+ } >+ ); >+ >+ my $unresolved_claims = $patron->unresolved_return_claims; >+ is( $unresolved_claims->count, 1, "Got back correct number of unresolved claims" ); >+ >+ $claim->resolve( { resolution => "X", resolved_by => $librarian } ); >+ is( $unresolved_claims->count, 0, "Claim is now resolved, so the count is 0" ); >+ >+}; >+ > subtest 'Test Koha::Checkout::claim_returned, mark as returned' => sub { > plan tests => 8; > >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25733
:
168678
|
168679
| 168680 |
168681
|
168759