Bugzilla – Attachment 161896 Details for
Bug 35248
Bookings needs unit tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35248: Add tests for Koha::Booking->_assign_item_for_booking
Bug-35248-Add-tests-for-KohaBooking-assignitemforb.patch (text/plain), 1.36 KB, created by
Martin Renvoize (ashimema)
on 2024-02-08 12:19:33 UTC
(
hide
)
Description:
Bug 35248: Add tests for Koha::Booking->_assign_item_for_booking
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-02-08 12:19:33 UTC
Size:
1.36 KB
patch
obsolete
>From 6a2b76e3d49b48314c48fea64687cee4edaa1c54 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 8 Feb 2024 11:52:09 +0000 >Subject: [PATCH] Bug 35248: Add tests for > Koha::Booking->_assign_item_for_booking > >--- > t/db_dependent/Koha/Booking.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Booking.t b/t/db_dependent/Koha/Booking.t >index 77f40069201..9a0a98a55c4 100755 >--- a/t/db_dependent/Koha/Booking.t >+++ b/t/db_dependent/Koha/Booking.t >@@ -100,7 +100,7 @@ subtest 'Relation accessor tests' => sub { > }; > > subtest 'store() tests' => sub { >- plan tests => 12; >+ plan tests => 13; > $schema->storage->txn_begin; > > my $patron = $builder->build_object( { class => "Koha::Patrons" } ); >@@ -279,5 +279,15 @@ subtest 'store() tests' => sub { > ok( $booking->in_storage, 'Booking stored OK when item not specified and the booking slot is available' ); > ok( $booking->item_id, 'An item was assigned to the booking' ); > >+ subtest '_assign_item_for_booking() tests' => sub { >+ plan tests => 1; >+ is( $booking->item_id, $item_1->itemnumber, "Item 1 was assigned to the booking" ); >+ >+ # Bookings >+ # â Item 1 |----| >+ # â Item 2 |--| >+ # â Any (1) |--| >+ }; >+ > $schema->storage->txn_rollback; > }; >-- >2.43.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 35248
:
161061
|
161062
|
161608
|
161611
|
161620
|
161621
|
161632
|
161636
|
161651
|
161652
|
161653
|
161654
|
161655
|
161656
|
161657
|
161658
|
161659
|
161660
|
161821
|
161822
|
161823
|
161824
|
161825
|
161826
|
161827
|
161828
|
161829
|
161830
|
161831
|
161861
|
161862
|
161863
|
161864
|
161865
|
161866
|
161867
|
161868
|
161869
|
161870
|
161871
|
161890
|
161891
|
161893
|
161894
|
161895
|
161896
|
161897
|
161898
|
161899
|
161900
|
161901
|
161902
|
161903
|
161904
|
161905
|
161906
|
161907
|
161908
|
161909
|
161910
|
161911
|
161912