Bugzilla – Attachment 104300 Details for
Bug 24769
DataTable error on patron hold page when hold placed (ILS-DI and other bugs)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Better tests...
Bug-24769-Regression-tests.patch (text/plain), 2.65 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-05-04 14:54:03 UTC
(
hide
)
Description:
Better tests...
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-05-04 14:54:03 UTC
Size:
2.65 KB
patch
obsolete
>From 9d3d2f9fe99c2e8c2568563f28acfcc55364fb9e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 4 May 2020 11:25:35 -0300 >Subject: [PATCH] Bug 24769: Regression tests > >When regressions are found, we introduce regression tests :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/ILSDI_Services.t | 6 +++++- > t/db_dependent/SIP/Transaction.t | 6 ++++-- > 2 files changed, 9 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index fdce3f4a0b..3f253149e3 100644 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -454,7 +454,7 @@ subtest 'Holds test' => sub { > > subtest 'Holds test for branch transfer limits' => sub { > >- plan tests => 4; >+ plan tests => 6; > > $schema->storage->txn_begin; > >@@ -536,11 +536,15 @@ subtest 'Holds test for branch transfer limits' => sub { > > $reply = C4::ILSDI::Services::HoldItem( $query ); > is( $reply->{code}, undef, "Item hold, Item can be transferred" ); >+ my $hold = Koha::Holds->search({ itemnumber => $item->{itemnumber}, borrowernumber => $patron->{borrowernumber} })->next; >+ is( $hold->branchcode, $pickup_branch->{branchcode}, 'The library id is correctly set' ); > > Koha::Holds->search()->delete(); > > $reply = C4::ILSDI::Services::HoldTitle( $query ); > is( $reply->{code}, undef, "Record hold, Item con be transferred" ); >+ $hold = Koha::Holds->search({ biblionumber => $biblio->{biblionumber}, borrowernumber => $patron->{borrowernumber} })->next; >+ is( $hold->branchcode, $pickup_branch->{branchcode}, 'The library id is correctly set' ); > > $schema->storage->txn_rollback; > }; >diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t >index 6c38ecad49..cb10003c42 100755 >--- a/t/db_dependent/SIP/Transaction.t >+++ b/t/db_dependent/SIP/Transaction.t >@@ -209,7 +209,7 @@ subtest cancel_hold => sub { > }; > > subtest do_hold => sub { >- plan tests => 7; >+ plan tests => 8; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $patron_1 = $builder->build_object( >@@ -265,7 +265,9 @@ subtest do_hold => sub { > my $hold = $transaction->do_hold(); > is( $item->biblio->holds->count(), 2, "Bib has 2 holds" ); > >- is( $patron_2->holds->next->priority, 2, 'Hold placed from SIP should have a correct priority of 2'); >+ my $THE_hold = $patron_2->holds->next; >+ is( $THE_hold->priority, 2, 'Hold placed from SIP should have a correct priority of 2'); >+ is( $THE_hold->branchcode, $patron_2->branchcode, 'Hold placed from SIP should have the branchcode set' ); > }; > > subtest do_checkin => sub { >-- >2.26.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 24769
:
99820
|
103636
|
103637
|
103638
|
103643
|
103644
|
104296
|
104297
|
104298
| 104300