Bugzilla – Attachment 67756 Details for
Bug 19066
Add branchcode to accountlines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19066 [QA Followup] - Fix related unit test failures
Bug-19066-QA-Followup---Fix-related-unit-test-fail.patch (text/plain), 3.15 KB, created by
Kyle M Hall (khall)
on 2017-10-06 18:51:25 UTC
(
hide
)
Description:
Bug 19066 [QA Followup] - Fix related unit test failures
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-10-06 18:51:25 UTC
Size:
3.15 KB
patch
obsolete
>From a9d4a5cad09f9fd46a21d42cdff9cc7bc987a9ed Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 6 Oct 2017 14:51:10 -0400 >Subject: [PATCH] Bug 19066 [QA Followup] - Fix related unit test failures > >--- > C4/Accounts.pm | 2 ++ > C4/Circulation.pm | 2 +- > t/db_dependent/00-strict.t | 24 ------------------------ > t/db_dependent/Circulation/issue.t | 4 ++-- > 4 files changed, 5 insertions(+), 27 deletions(-) > delete mode 100644 t/db_dependent/00-strict.t > >diff --git a/C4/Accounts.pm b/C4/Accounts.pm >index a963aae..2a2eeb0 100644 >--- a/C4/Accounts.pm >+++ b/C4/Accounts.pm >@@ -211,6 +211,8 @@ sub manualinvoice { > my $accountno = getnextacctno($borrowernumber); > my $amountleft = $amount; > >+ $itemnum ||= undef; >+ > if ( ( $type eq 'L' ) > or ( $type eq 'F' ) > or ( $type eq 'A' ) >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 723796e..8a522f8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3223,7 +3223,7 @@ sub AddIssuingCharge { > > my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; > >- Koha::Account::Line->new( >+ return Koha::Account::Line->new( > { > date => dt_from_string(), > borrowernumber => $borrowernumber, >diff --git a/t/db_dependent/00-strict.t b/t/db_dependent/00-strict.t >deleted file mode 100644 >index 11e9403..0000000 >--- a/t/db_dependent/00-strict.t >+++ /dev/null >@@ -1,24 +0,0 @@ >-# This script is called by the pre-commit git hook to test modules compile >- >-use strict; >-use warnings; >-use Test::More; >-use Test::Strict; >-use File::Spec; >-use File::Find; >-use lib("misc/translator"); >-use lib("installer"); >- >-my @dirs = ( 'acqui', 'admin', 'authorities', 'basket', >- 'catalogue', 'cataloguing', 'changelanguage.pl', 'circ', 'debian', 'docs', >- 'edithelp.pl', 'errors', 'fix-perl-path.PL', 'help.pl', 'installer', >- 'koha_perl_deps.pl', 'kohaversion.pl', 'labels', >- 'mainpage.pl', 'Makefile.PL', 'members', 'misc', 'offline_circ', 'opac', >- 'patroncards', 'reports', 'reserve', 'reviews', >- 'rewrite-config.PL', 'rotating_collections', 'serials', 'services', 'skel', >- 'sms', 'suggestion', 'svc', 'tags', 'tools', 'virtualshelves' ); >- >-$Test::Strict::TEST_STRICT = 0; >-$Test::Strict::TEST_SKIP = [ 'misc/kohalib.pl', 'sms/sms_listen_windows_start.pl', 'misc/plack/koha.psgi' ]; >- >-all_perl_files_ok(@dirs); >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index 2f12201..eb5d3e1 100644 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -207,8 +207,8 @@ $sth = $dbh->prepare($query); > $sth->execute; > my $countaccount = $sth -> fetchrow_array; > is ($countaccount,0,"0 accountline exists"); >-is( C4::Circulation::AddIssuingCharge( $item_id1, $borrower_id1, 10 ), >- 1, "An issuing charge has been added" ); >+isa_ok( C4::Circulation::AddIssuingCharge( $item_id1, $borrower_id1, 10 ), >+ 'Koha::Account::Line', "An issuing charge has been added" ); > my $account_id = $dbh->last_insert_id( undef, undef, 'accountlines', undef ); > $sth->execute; > $countaccount = $sth -> fetchrow_array; >-- >2.10.2
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 19066
:
65769
|
65770
|
65771
|
67756
|
67757
|
71153
|
71154
|
71155
|
73185
|
73186
|
73187
|
73595
|
77281
|
77282
|
77283
|
78900
|
78901
|
81144
|
81145
|
81146
|
81253
|
81254
|
81255
|
81684
|
81912
|
81918
|
82047
|
82048
|
82084
|
82086
|
82087
|
82469
|
82470
|
82471
|
82473
|
82474
|
82475
|
82476
|
82477
|
82478
|
83067
|
83068
|
83069
|
83070
|
83071
|
83072
|
83073
|
83074
|
83075
|
83076
|
83077
|
83078
|
83079
|
83080
|
83081
|
83082
|
83083
|
83084
|
83275
|
83519
|
83520
|
83521
|
83522
|
83523
|
83524
|
83525
|
83526
|
83527
|
83528
|
83628