Bugzilla – Attachment 104008 Details for
Bug 25297
Consistent return value in K::A::Order->current_item_level_holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25297: Regression tests
Bug-25297-Regression-tests.patch (text/plain), 2.04 KB, created by
Frédéric Demians
on 2020-04-30 09:22:03 UTC
(
hide
)
Description:
Bug 25297: Regression tests
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2020-04-30 09:22:03 UTC
Size:
2.04 KB
patch
obsolete
>From 2d67b270191fd3f887d80b6323aeac6717ef0d23 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 27 Apr 2020 18:55:32 -0300 >Subject: [PATCH] Bug 25297: Regression tests >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> >--- > t/db_dependent/Koha/Acquisition/Order.t | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/Acquisition/Order.t b/t/db_dependent/Koha/Acquisition/Order.t >index f62f3ebcf2..2b00e3cc4c 100644 >--- a/t/db_dependent/Koha/Acquisition/Order.t >+++ b/t/db_dependent/Koha/Acquisition/Order.t >@@ -285,7 +285,7 @@ subtest 'duplicate_to | add_item' => sub { > > subtest 'current_item_level_holds() tests' => sub { > >- plan tests => 3; >+ plan tests => 5; > > $schema->storage->txn_begin; > >@@ -334,16 +334,23 @@ subtest 'current_item_level_holds() tests' => sub { > } > ); > >- is( $order->current_item_level_holds, undef, 'Returns undef if no linked biblio'); >+ my $holds = $order->current_item_level_holds; >+ >+ is( ref($holds), 'Koha::Holds', 'Koha::Holds iterator returned if no linked biblio' ); >+ is( $holds->count, 0, 'Count is 0 if no linked biblio' ); > > $order->set({ biblionumber => $biblio->biblionumber })->store->discard_changes; > >- is( $order->current_item_level_holds, undef, 'Returns undef if no linked items'); >+ $holds = $order->current_item_level_holds; >+ >+ is( ref($holds), 'Koha::Holds', 'Koha::Holds iterator returned if no linked items' ); >+ is( $holds->count, 0, 'Count is 0 if no linked items' ); > > $order->add_item( $item_2->itemnumber ); > $order->add_item( $item_3->itemnumber ); > >- is( $order->current_item_level_holds->count, 1, 'Only current (not future) holds are returned'); >+ $holds = $order->current_item_level_holds; >+ is( $holds->count, 1, 'Only current (not future) holds are returned'); > > $schema->storage->txn_rollback; > }; >-- >2.17.1
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 25297
:
103813
|
103814
|
104008
|
104009
|
104014
|
104015