Bugzilla – Attachment 66786 Details for
Bug 19120
Order cancelled status is reset on basket open
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19120: Add tests to reproduce the problem
Bug-19120-Add-tests-to-reproduce-the-problem.patch (text/plain), 2.25 KB, created by
Mark Tompsett
on 2017-09-02 01:26:15 UTC
(
hide
)
Description:
Bug 19120: Add tests to reproduce the problem
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-09-02 01:26:15 UTC
Size:
2.25 KB
patch
obsolete
>From 5e8495f70395a902a5ecca07e73a2b653172908e Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 1 Sep 2017 21:21:40 -0400 >Subject: [PATCH] Bug 19120: Add tests to reproduce the problem > >TEST PLAN >--------- >1) apply this patch >2) prove t/db_dependent/Acquisition/close_reopen_basket.t > -- FAILS! > -- This proves the test works. >3) run koha qa test tools >--- > t/db_dependent/Acquisition/close_reopen_basket.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Acquisition/close_reopen_basket.t b/t/db_dependent/Acquisition/close_reopen_basket.t >index 191612a..b1c392f 100644 >--- a/t/db_dependent/Acquisition/close_reopen_basket.t >+++ b/t/db_dependent/Acquisition/close_reopen_basket.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > >-use Test::More tests => 10; >+use Test::More tests => 14; > use C4::Acquisition; > use C4::Biblio qw( AddBiblio DelBiblio ); > use C4::Budgets; >@@ -86,9 +86,19 @@ C4::Acquisition::DelOrder( $biblionumber1, $ordernumber1 ); > my ( $order ) = C4::Acquisition::GetOrders( $basketno, {cancelled => 1} ); > is( $order->{ordernumber}, $ordernumber1, 'The order returned by GetOrders should have been the right one' ); > is( $order->{orderstatus}, 'cancelled', 'DelOrder should have set status to cancelled' ); >+ > C4::Acquisition::CloseBasket( $basketno ); > ( $order ) = C4::Acquisition::GetOrders( $basketno, {cancelled => 1} ); > is( $order->{ordernumber}, $ordernumber1, 'The order returned by GetOrders should have been the right one' ); > is( $order->{orderstatus}, 'cancelled', 'CloseBasket should not reset the status to ordered for cancelled orders' ); > >+C4::Acquisition::ReopenBasket( $basketno ); >+( $order ) = C4::Acquisition::GetOrders( $basketno, {cancelled => 1} ); >+is( $order->{ordernumber}, $ordernumber1, 'The expected order is cancelled, the basket is reopened' ); >+is( $order->{orderstatus}, 'cancelled', 'ReopenBasket should not reset the status for cancelled orders' ); >+ >+( $order ) = C4::Acquisition::GetOrders( $basketno, { cancelled => 0 } ); >+is ( $order->{ordernumber}, $ordernumber2, "The expect order is not cancelled, the basket is reopened" ); >+is ( $order->{orderstatus}, 'new', 'The expected order is new, the basket is reopened' ); >+ > $schema->storage->txn_rollback(); >-- >2.1.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 19120
:
66786
|
66787
|
66908
|
66909
|
67436
|
67437