Bugzilla – Attachment 110522 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.10 KB, created by
Katrin Fischer
on 2020-09-21 22:50:25 UTC
(
hide
)
Description:
Bug 26503: Add unit tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-09-21 22:50:25 UTC
Size:
2.10 KB
patch
obsolete
>From 9460d91c1f842474989a0a74582cd59b5f0a2bb5 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. >--- > 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