Bugzilla – Attachment 166001 Details for
Bug 36120
Add pickup locations to bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36120: (QA follow-up) Fix Circulation.t
Bug-36120-QA-follow-up-Fix-Circulationt.patch (text/plain), 3.42 KB, created by
Martin Renvoize (ashimema)
on 2024-05-01 15:04:13 UTC
(
hide
)
Description:
Bug 36120: (QA follow-up) Fix Circulation.t
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-01 15:04:13 UTC
Size:
3.42 KB
patch
obsolete
>From 70f199a736280801998a064cb9f867d664c6aa85 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 1 May 2024 15:41:10 +0100 >Subject: [PATCH] Bug 36120: (QA follow-up) Fix Circulation.t > >We now require pickup_library_id and so need to update the unit tests to >reflect that for our sample bookings > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Circulation.t | 30 +++++++++++++++++------------- > 1 file changed, 17 insertions(+), 13 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 307db1d8a97..51387851e01 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1763,6 +1763,7 @@ subtest "CanBookBeRenewed | bookings" => sub { > my $renewing_patron = $builder->build_object( { class => 'Koha::Patrons' } ); > my $booked_patron = $builder->build_object( { class => 'Koha::Patrons' } ); > my $item = $builder->build_sample_item( { bookable => 1 } ); >+ my $pickup_library = $builder->build_object( { class => 'Koha::Libraries' } ); > > # issue > my $issue = AddIssue( $renewing_patron, $item->barcode ); >@@ -1772,11 +1773,12 @@ subtest "CanBookBeRenewed | bookings" => sub { > # item-level booking > my $booking = Koha::Booking->new( > { >- patron_id => $booked_patron->borrowernumber, >- item_id => $item->itemnumber, >- biblio_id => $item->biblio->biblionumber, >- start_date => $datedue->clone()->add( days => 2 ), >- end_date => $datedue->clone()->add( days => 10 ), >+ patron_id => $booked_patron->borrowernumber, >+ pickup_library_id => $pickup_library->branchcode, >+ item_id => $item->itemnumber, >+ biblio_id => $item->biblio->biblionumber, >+ start_date => $datedue->clone()->add( days => 2 ), >+ end_date => $datedue->clone()->add( days => 10 ), > } > )->store(); > >@@ -4746,18 +4748,20 @@ subtest 'CanBookBeIssued | bookings' => sub { > my $schema = Koha::Database->schema; > $schema->storage->txn_begin; > >- my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } ); >- my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } ); >- my $item = $builder->build_sample_item( { bookable => 1 } ); >+ my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $pickup_library = $builder->build_object( { class => 'Koha::Libraries' } ); >+ my $item = $builder->build_sample_item( { bookable => 1 } ); > > # item-level booking > my $booking = Koha::Booking->new( > { >- patron_id => $patron1->borrowernumber, >- item_id => $item->itemnumber, >- biblio_id => $item->biblio->biblionumber, >- start_date => dt_from_string()->subtract( days => 1 ), >- end_date => dt_from_string()->add( days => 6 ), >+ patron_id => $patron1->borrowernumber, >+ pickup_library_id => $pickup_library->branchcode, >+ item_id => $item->itemnumber, >+ biblio_id => $item->biblio->biblionumber, >+ start_date => dt_from_string()->subtract( days => 1 ), >+ end_date => dt_from_string()->add( days => 6 ), > } > )->store(); > >-- >2.44.0
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 36120
:
162911
|
162912
|
162914
|
162915
|
162916
|
162917
|
162918
|
162919
|
162920
|
162921
|
162922
|
162923
|
162924
|
162925
|
162926
|
162927
|
162928
|
162976
|
163218
|
163219
|
163220
|
163221
|
163222
|
163223
|
163224
|
163435
|
163436
|
163437
|
163438
|
163439
|
163440
|
163441
|
163442
|
163443
|
163444
|
163445
|
163446
|
163447
|
163448
|
163565
|
163566
|
163567
|
163568
|
163569
|
163570
|
163571
|
163603
|
163604
|
163605
|
163606
|
163607
|
163608
|
163609
|
163610
|
163611
|
163612
|
163613
|
163635
|
163636
|
165140
|
165175
|
165176
|
165177
|
165178
|
165179
|
165180
|
165181
|
165182
|
165183
|
165184
|
165185
|
165186
|
165187
|
165188
|
165214
|
165215
|
165216
|
165419
|
165420
|
165421
|
165422
|
165423
|
165424
|
165425
|
165426
|
165427
|
165428
|
165429
|
165430
|
165431
|
165432
|
165433
|
165434
|
165435
|
165984
|
165985
|
165986
|
165987
|
165988
|
165989
|
165990
|
165991
|
165992
|
165993
|
165994
|
165995
|
165996
|
165997
|
165998
|
165999
|
166000
| 166001 |
166002