Bugzilla – Attachment 111483 Details for
Bug 26503
Allow to limit on standing orders in acquisition advanced search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26503: Add unit tests
Bug-26503-Add-unit-tests.patch (text/plain), 2.41 KB, created by
Jonathan Druart
on 2020-10-12 09:08:43 UTC
(
hide
)
Description:
Bug 26503: Add unit tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-10-12 09:08:43 UTC
Size:
2.41 KB
patch
obsolete
>From 70c8b66d01cb4e61753c6713ca4c5d4042b39572 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Mon, 21 Sep 2020 05:52:27 +0000 >Subject: [PATCH] Bug 26503: Add unit tests > >Run > prove t/db_dependent/Acquisition.t > >Verify all tests pass. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >JD Amended patch: perltidy >--- > t/db_dependent/Acquisition.t | 43 +++++++++++++++++++++++++++++++++++- > 1 file changed, 42 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t >index 6028fea2b3..61063662f3 100755 >--- a/t/db_dependent/Acquisition.t >+++ b/t/db_dependent/Acquisition.t >@@ -19,7 +19,7 @@ use Modern::Perl; > > use POSIX qw(strftime); > >-use Test::More tests => 79; >+use Test::More tests => 80; > use t::lib::Mocks; > use Koha::Database; > use Koha::DateUtils qw(dt_from_string output_pref); >@@ -893,4 +893,45 @@ subtest 'GetHistory - managing library' => sub { > > }; > >+subtest 'GetHistory - is_standing' => sub { >+ >+ plan tests => 1; >+ >+ my $orders = GetHistory( is_standing => '1' ); >+ >+ my $builder = t::lib::TestBuilder->new; >+ >+ my $order_basket1 = $builder->build( { source => 'Aqbasket', value => { is_standing => 0 } } ); >+ my $orderinfo1 = { >+ basketno => $order_basket1->{basketno}, >+ rrp => 19.99, >+ replacementprice => undef, >+ quantity => 1, >+ quantityreceived => 0, >+ datereceived => undef, >+ datecancellationprinted => undef, >+ }; >+ my $order1 = $builder->build( { source => 'Aqorder', value => $orderinfo1 } ); >+ >+ my $order_basket2 = $builder->build( { source => 'Aqbasket', value => { is_standing => 1 } } ); >+ my $orderinfo2 = { >+ basketno => $order_basket2->{basketno}, >+ rrp => 19.99, >+ replacementprice => undef, >+ quantity => 1, >+ quantityreceived => 0, >+ datereceived => undef, >+ datecancellationprinted => undef, >+ }; >+ my $order2 = $builder->build( { source => 'Aqorder', value => $orderinfo2 } ); >+ >+ my $history = GetHistory( is_standing => 1 ); >+ is( >+ scalar(@$history), >+ scalar(@$orders) + 1, >+ "GetHistory returns number of standing orders" >+ ); >+ >+}; >+ > $schema->storage->txn_rollback(); >-- >2.20.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 26503
:
110521
|
110522
|
110549
|
110550
|
111431
|
111432
|
111433
|
111434
| 111483