Bugzilla – Attachment 8318 Details for
Bug 5347
late order management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5374 Followup: adds conditional check to unit test for late orders
Bug-5374-Followup-adds-conditional-check-to-unit-t.patch (text/plain), 1.70 KB, created by
Ian Walls
on 2012-03-19 23:19:46 UTC
(
hide
)
Description:
Bug 5374 Followup: adds conditional check to unit test for late orders
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2012-03-19 23:19:46 UTC
Size:
1.70 KB
patch
obsolete
>From ef63cd0fb8d87a1fbc40b97a645220ae5dc6d073 Mon Sep 17 00:00:00 2001 >From: Ian Walls <koha.sekjal@gmail.com> >Date: Mon, 19 Mar 2012 19:16:48 -0400 >Subject: [PATCH] Bug 5374 Followup: adds conditional check to unit test for late orders > >If there are no late orders in the database, the 5th unit test for C4/Acquisition.pm >fails, since no date is returned (and today's date is expected) > >This patch adds a conditional check around whether any late orders are actually returned >by GetLateOrders. If so, tests proceed, if not, they're skipped. This seems to quiet >the failures in the automated test suite. > >http://bugs.koha-community.org/show_bug.cgi?id=5347 >--- > t/db_dependent/Acquisition.t | 11 +++++++---- > 1 files changed, 7 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Acquisition.t b/t/db_dependent/Acquisition.t >index ab0b6d0..2c39128 100755 >--- a/t/db_dependent/Acquisition.t >+++ b/t/db_dependent/Acquisition.t >@@ -33,10 +33,13 @@ my $orders = GetPendingOrders( $supplierid, $grouped ); > isa_ok( $orders, 'ARRAY' ); > > my @lateorders = GetLateOrders(0); >-my $order = $lateorders[0]; >-AddClaim( $order->{ordernumber} ); >-my $neworder = GetOrder( $order->{ordernumber} ); >-is( $neworder->{claimed_date}, strftime( "%Y-%m-%d", localtime(time) ), "AddClaim : Check claimed_date" ); >+SKIP: { >+ skip 'No Late Orders, cannot test AddClaim', 1 unless @lateorders; >+ my $order = $lateorders[0]; >+ AddClaim( $order->{ordernumber} ); >+ my $neworder = GetOrder( $order->{ordernumber} ); >+ is( $neworder->{claimed_date}, strftime( "%Y-%m-%d", localtime(time) ), "AddClaim : Check claimed_date" ); >+} > > SKIP: { > skip 'No relevant orders in database, cannot test baskets', 33 unless( scalar @$orders ); >-- >1.7.0.4
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 5347
:
6538
|
6578
|
6634
|
6661
|
6664
|
6782
|
6808
|
6943
|
6961
|
6962
|
6963
|
6969
|
6970
|
6991
|
7008
|
7196
|
8318
|
9165
|
9166
|
9208
|
9254