Bugzilla – Attachment 110550 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.15 KB, created by
David Nind
on 2020-09-22 12:50:42 UTC
(
hide
)
Description:
Bug 26503: Add unit tests
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-09-22 12:50:42 UTC
Size:
2.15 KB
patch
obsolete
>From 05487ec5ae68435b6270d7bd29dc5eef4c7fb6c9 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> >--- > t/db_dependent/Acquisition.t | 39 ++++++++++++++++++++++++++++++++++++++- > 1 file changed, 38 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t >index 6028fea2b3..97c6c3fb42 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,41 @@ 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.11.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 26503
:
110521
|
110522
|
110549
|
110550
|
111431
|
111432
|
111433
|
111434
|
111483