Bugzilla – Attachment 48602 Details for
Bug 15084
Move the currency related code to Koha::Acquisition::Currenc[y|ies]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15084 [QA Followup] - Clean up test currencies after unit tests
Bug-15084-QA-Followup---Clean-up-test-currencies-a.patch (text/plain), 1.46 KB, created by
Jonathan Druart
on 2016-03-03 08:42:28 UTC
(
hide
)
Description:
Bug 15084 [QA Followup] - Clean up test currencies after unit tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-03 08:42:28 UTC
Size:
1.46 KB
patch
obsolete
>From 7f1393a4273865393ea1849588b566cdb73856e3 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 22 Jan 2016 18:23:59 +0000 >Subject: [PATCH] Bug 15084 [QA Followup] - Clean up test currencies after unit > tests > >Test currency left behind will cuase next run of the unit test to fail >as well as leaving db cruft. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/Koha/Acquisition/Currencies.t | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/t/db_dependent/Koha/Acquisition/Currencies.t b/t/db_dependent/Koha/Acquisition/Currencies.t >index 2abf992..99c393e 100644 >--- a/t/db_dependent/Koha/Acquisition/Currencies.t >+++ b/t/db_dependent/Koha/Acquisition/Currencies.t >@@ -19,10 +19,18 @@ > > use Modern::Perl; > use Test::More tests => 6; >+use Koha::Database; > use Koha::Acquisition::Currency; > use Koha::Acquisition::Currencies; > use t::lib::TestBuilder; > >+my $schema = Koha::Database->schema; >+$schema->storage->txn_begin; >+my $dbh = C4::Context->dbh; >+ >+# Start transaction >+$dbh->{RaiseError} = 1; >+ > my $builder = t::lib::TestBuilder->new; > my $nb_of_currencies = Koha::Acquisition::Currencies->search->count; > my $new_currency_1 = Koha::Acquisition::Currency->new({ >@@ -56,3 +64,4 @@ is ( $nb_of_active_currencies, 1, 'Only 1 currency should be marked as active' ) > > $retrieved_currency_1->delete; > is( Koha::Acquisition::Currencies->search->count, $nb_of_currencies + 1, 'Delete should have deleted the currency' ); >+ >-- >2.7.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 15084
:
44162
|
44163
|
44164
|
44165
|
44166
|
44167
|
44168
|
45690
|
45691
|
45692
|
45693
|
45694
|
45695
|
45696
|
45759
|
45761
|
45807
|
45808
|
45809
|
45810
|
45811
|
45812
|
45813
|
45814
|
47213
|
47214
|
47215
|
47216
|
47217
|
47218
|
47219
|
47220
|
47221
|
48594
|
48595
|
48596
|
48597
|
48598
|
48599
|
48600
|
48601
| 48602 |
48603
|
48703
|
48747
|
48772
|
48783
|
48858