Bugzilla – Attachment 161614 Details for
Bug 35840
Local use is double-counted when using both RecordLocalUseOnReturn and statistical patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35840: Add unit tests
Bug-35840-Add-unit-tests.patch (text/plain), 1.89 KB, created by
Lucas Gass (lukeg)
on 2024-01-29 19:42:07 UTC
(
hide
)
Description:
Bug 35840: Add unit tests
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-01-29 19:42:07 UTC
Size:
1.89 KB
patch
obsolete
>From 7fcf4ebb7e5f1dd9d5be0a7c680463f1fb44f5a9 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 29 Jan 2024 19:38:50 +0000 >Subject: [PATCH] Bug 35840: Add unit tests > >--- > t/db_dependent/Circulation.t | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 5095afde73..27a5815434 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -2434,7 +2434,7 @@ subtest 'CanBookBeIssued + Koha::Patron->is_debarred|has_overdues' => sub { > }; > > subtest 'CanBookBeIssued + Statistic patrons "X"' => sub { >- plan tests => 11; >+ plan tests => 14; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $patron_category_x = $builder->build_object( >@@ -2486,6 +2486,19 @@ subtest 'CanBookBeIssued + Statistic patrons "X"' => sub { > $item_2->discard_changes; > ok( !$item_2->onloan, "Checked out item is returned" ); > >+ my $item_3 = $builder->build_sample_item( { library => $library->branchcode } ); >+ CanBookBeIssued( $patron, $item_3->barcode ); >+ $item_3->discard_changes; >+ is( Koha::Statistics->search( { itemnumber => $item_3->itemnumber } )->count, 1, 'Single entry recorded in the stats table' ); >+ >+ my $item_4 = $builder->build_sample_item( { library => $library->branchcode } ); >+ AddIssue( $patron_2, $item_4->barcode ); >+ $item_4->discard_changes; >+ is( Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 1, 'Issue should be recorded in statistics table for item 4.' ); >+ CanBookBeIssued( $patron, $item_4->barcode ); >+ $item_4->discard_changes; >+ is( Koha::Statistics->search( { itemnumber => $item_4->itemnumber } )->count, 3, 'Issue, return, and localuse should be recorded in statistics table for item 4.' ); >+ > # TODO There are other tests to provide here > }; > >-- >2.30.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 35840
:
161212
|
161217
|
161223
|
161374
|
161442
|
161443
|
161612
|
161613
|
161614
|
161732
|
161733
|
162963
|
162964
|
162965