Bugzilla – Attachment 51400 Details for
Bug 16496
accountlines.issue_id not set when new overdue is processed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16496: Add test
Bug-16496-Add-test.patch (text/plain), 2.22 KB, created by
Jonathan Druart
on 2016-05-11 09:24:52 UTC
(
hide
)
Description:
Bug 16496: Add test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-05-11 09:24:52 UTC
Size:
2.22 KB
patch
obsolete
>From b4fde9ec0d19eebbf19a0212a9ef14da2bb586b0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 11 May 2016 10:24:13 +0100 >Subject: [PATCH] Bug 16496: Add test > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Circulation.t | 40 +++++++++++++++++++++++++++++++++++++++- > 1 file changed, 39 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index b1dd6f1..cfee3e2 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -30,7 +30,7 @@ use Koha::Database; > > use t::lib::TestBuilder; > >-use Test::More tests => 83; >+use Test::More tests => 84; > > BEGIN { > use_ok('C4::Circulation'); >@@ -870,4 +870,42 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > is( $error, 'onsite_checkout', 'A correct error code should be returned by CanBookBeRenewed for on-site checkout' ); > } > >+{ >+ my $library = $builder->build({ source => 'Branch' }); >+ >+ my $biblio = MARC::Record->new(); >+ my ($biblionumber, $biblioitemnumber) = AddBiblio($biblio, ''); >+ >+ my $barcode = 'just a barcode'; >+ my ( undef, undef, $itemnumber ) = AddItem( >+ { >+ homebranch => $library->{branchcode}, >+ holdingbranch => $library->{branchcode}, >+ barcode => $barcode, >+ }, >+ $biblionumber, >+ ); >+ >+ my $patron = $builder->build({ source => 'Borrower', value => { branchcode => $library->{branchcode} } } ); >+ >+ my $issue = AddIssue( GetMember( borrowernumber => $patron->{borrowernumber} ), $barcode ); >+ UpdateFine( >+ { >+ issue_id => $issue->id(), >+ itemnumber => $itemnumber, >+ borrowernumber => $patron->{borrowernumber}, >+ amount => 1, >+ } >+ ); >+ UpdateFine( >+ { >+ issue_id => $issue->id(), >+ itemnumber => $itemnumber, >+ borrowernumber => $patron->{borrowernumber}, >+ amount => 2, >+ } >+ ); >+ is( Koha::Account::Lines->search({ issue_id => $issue->id })->count, 1, 'UpdateFine should not create a new accountline when updating an existing fine'); >+} >+ > 1; >-- >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 16496
:
51394
|
51395
|
51397
|
51399
| 51400