Bugzilla – Attachment 86173 Details for
Bug 18823
Advanced editor - Rancor - add ability to edit records in import batches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21720: Update Tests
Bug-21720-Update-Tests.patch (text/plain), 2.44 KB, created by
ByWater Sandboxes
on 2019-03-06 14:24:02 UTC
(
hide
)
Description:
Bug 21720: Update Tests
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2019-03-06 14:24:02 UTC
Size:
2.44 KB
patch
obsolete
>From e20b3af596a984ebe0958649bc016c78c60afd42 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 30 Nov 2018 13:30:24 +0000 >Subject: [PATCH] Bug 21720: Update Tests > >AddIssuing charge is always called in void context, but the tests >checked that the return value was a Koha::Account::Offset and we now >return a Koha::Account::Line. > >This patch changes the test to accept a Koha::Account::Line as returned, >adds a test to ensure a Koha::Account::Offset is also created and >corrects the logic that tests that only one accountline is added. > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: cori <corilynn.arnold@gmail.com> > >https://bugs.koha-community.org/show_bug.cgi?id=18823 >--- > t/db_dependent/Circulation/issue.t | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index f0e080f371..ede30003e7 100644 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 32; >+use Test::More tests => 33; > use DateTime::Duration; > > use t::lib::Mocks; >@@ -192,16 +192,16 @@ is ($countissue,1,"1 issues have been added"); > $query = " SELECT count(*) FROM accountlines"; > $sth = $dbh->prepare($query); > $sth->execute; >-my $countaccount = $sth -> fetchrow_array; >+my $countaccount = $sth->fetchrow_array; > is ($countaccount,0,"0 accountline exists"); > my $checkout = Koha::Checkouts->find( $issue_id1 ); >-my $offset = C4::Circulation::AddIssuingCharge( $checkout, 10 ); >-is( ref( $offset ), 'Koha::Account::Offset', "An issuing charge has been added" ); >-my $charge = Koha::Account::Lines->find( $offset->debit_id ); >+my $charge = C4::Circulation::AddIssuingCharge( $checkout, 10 ); >+is( ref( $charge ), 'Koha::Account::Line', "An issuing charge has been added" ); > is( $charge->issue_id, $issue_id1, 'Issue id is set correctly for issuing charge' ); >-my $account_id = $dbh->last_insert_id( undef, undef, 'accountlines', undef ); >+my $offset = Koha::Account::Offsets->find( { debit_id => $charge->id } ); >+is( $offset->credit_id, undef, 'Offset was created'); > $sth->execute; >-$countaccount = $sth -> fetchrow_array; >+$countaccount = $sth->fetchrow_array; > is ($countaccount,1,"1 accountline has been added"); > > # Test AddRenewal >-- >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 18823
:
64434
|
66882
|
66883
|
66884
|
66885
|
66919
|
77240
|
77241
|
77242
|
77243
|
77244
|
79240
|
79241
|
79242
|
79243
|
79244
|
80519
|
80536
|
80604
|
80606
|
80608
|
80613
|
80626
|
80627
|
80628
|
80637
|
80639
|
80651
|
80861
|
80866
|
80868
|
80869
|
80870
|
80871
|
80872
|
80873
|
80947
|
85355
|
85356
|
85357
|
85358
|
85359
|
85376
|
85719
|
85720
|
85785
|
85828
|
86087
|
86173
|
86174
|
86175
|
86176
|
86177
|
86178
|
86179
|
86180
|
86181
|
86182
|
86183
|
86791
|
86792
|
86793
|
86794
|
86795
|
86796
|
86797
|
86798
|
86799
|
88417
|
88418
|
88419
|
88420
|
88421
|
88422
|
88423
|
88424
|
88425
|
88426
|
88427
|
88428
|
88429
|
88430
|
88431
|
88432
|
88493
|
88494
|
88495
|
88496
|
88497
|
88498
|
88499
|
88500
|
88501
|
88502
|
88503
|
88504
|
88505
|
88506
|
88507
|
88508
|
91205
|
91206
|
91207
|
91208
|
91209
|
91210
|
91211
|
91212
|
91213
|
91214
|
91215
|
91216
|
91217
|
91218
|
91219
|
92051
|
92120
|
92124
|
94436
|
94437
|
94438
|
94439
|
94440
|
94441
|
94442
|
94443
|
94444
|
94445
|
94446
|
94447
|
94448
|
94449
|
94450
|
94451
|
94452
|
99092
|
99093
|
99094
|
99095
|
99096
|
99097
|
99098
|
99099
|
99100
|
99101
|
99102
|
99103
|
99104
|
99105
|
99106
|
99107
|
99108
|
99109