Bugzilla – Attachment 20695 Details for
Bug 5349
Moving an order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5349: Use DB transaction/rollback in unit tests
Bug-5349-Use-DB-transactionrollback-in-unit-tests.patch (text/plain), 1.73 KB, created by
Chris Cormack
on 2013-08-28 10:58:09 UTC
(
hide
)
Description:
Bug 5349: Use DB transaction/rollback in unit tests
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-08-28 10:58:09 UTC
Size:
1.73 KB
patch
obsolete
>From 21611c58d57dd01c32f7d25f8325062d556e7d5b Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 2 Jul 2013 08:12:02 +0000 >Subject: [PATCH] Bug 5349: Use DB transaction/rollback in unit tests > >Signed-off-by: sonia <koha@univ-lyon3.fr> >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > t/db_dependent/Acquisition/TransferOrder.t | 20 +++++++------------- > 1 file changed, 7 insertions(+), 13 deletions(-) > >diff --git a/t/db_dependent/Acquisition/TransferOrder.t b/t/db_dependent/Acquisition/TransferOrder.t >index fd294e2..7e39b77 100644 >--- a/t/db_dependent/Acquisition/TransferOrder.t >+++ b/t/db_dependent/Acquisition/TransferOrder.t >@@ -2,7 +2,8 @@ > > use Modern::Perl; > >-use Test::More; >+use Test::More tests => 6; >+use C4::Context; > use C4::Acquisition; > use C4::Biblio; > use C4::Items; >@@ -10,6 +11,10 @@ use C4::Bookseller; > use C4::Budgets; > use MARC::Record; > >+my $dbh = C4::Context->dbh; >+$dbh->{RaiseError} = 1; >+$dbh->{AutoCommit} = 0; >+ > my $booksellerid1 = C4::Bookseller::AddBookseller( > { > name => "my vendor 1", >@@ -72,15 +77,4 @@ is(scalar GetOrders($basketno2), 1, "1 order in basket2"); > ($order) = GetOrders($basketno2); > is(scalar GetItemnumbersFromOrder($order->{ordernumber}), 1, "1 item in basket2's order"); > >-END { >- C4::Acquisition::DelOrder( $biblionumber, $ordernumber ); >- C4::Acquisition::DelOrder( $biblionumber, $newordernumber ); >- C4::Budgets::DelBudget( $budgetid ); >- C4::Acquisition::DelBasket( $basketno1 ); >- C4::Bookseller::DelBookseller( $booksellerid1 ); >- C4::Acquisition::DelBasket( $basketno2 ); >- C4::Bookseller::DelBookseller( $booksellerid2 ); >- C4::Biblio::DelBiblio($biblionumber); >-}; >- >-done_testing; >+$dbh->rollback; >-- >1.8.4.rc2
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 5349
:
8961
|
8962
|
9909
|
10032
|
10190
|
10375
|
10376
|
10441
|
10462
|
10463
|
10636
|
11117
|
11118
|
11385
|
11386
|
12236
|
12237
|
12238
|
12420
|
12421
|
12422
|
12462
|
12463
|
12464
|
14441
|
14442
|
14443
|
16499
|
16500
|
16501
|
18931
|
18933
|
18934
|
18935
|
19332
|
19333
|
19336
|
19917
|
19918
|
19919
|
19920
|
19921
|
19922
|
20476
|
20477
|
20478
|
20479
|
20480
|
20481
|
20691
|
20692
|
20693
|
20694
| 20695 |
20696