Bugzilla – Attachment 65842 Details for
Bug 19070
Fix Circulation/Branch.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19070: Fix Circulation/Branch.t
Bug-19070-Fix-CirculationBrancht.patch (text/plain), 2.40 KB, created by
Jonathan Druart
on 2017-08-10 18:42:01 UTC
(
hide
)
Description:
Bug 19070: Fix Circulation/Branch.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-08-10 18:42:01 UTC
Size:
2.40 KB
patch
obsolete
>From 0ee2c0fdda949b35355a508bcc1ec0568e7ad2a7 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 10 Aug 2017 09:04:16 +0200 >Subject: [PATCH] Bug 19070: Fix Circulation/Branch.t > >Resolve: >DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_master`.`clubs`, CONSTRAINT `clubs_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)) [for Statement "DELETE FROM branches"] at t/db_dependent/Circulation/Branch.t line 49. > >Resolve: >not ok 14 - AddReturn respects branch item return policy - noreturn > Failed test 'AddReturn respects branch item return policy - noreturn' > at t/db_dependent/Circulation/Branch.t line 279. > got: 'yqiKrIkX' > expected: undef > >Cause: >There is a record in clubs. The constraint in clubs on branchcode does not >include a cascaded delete. The test deletes all branches. >Test 14 depends on item-level_itypes==1. When you set it to Biblio, it fails. > >Test plan: >Run t/db_dependent/Circulation/Branch.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Circulation/Branch.t | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/t/db_dependent/Circulation/Branch.t b/t/db_dependent/Circulation/Branch.t >index 9a040d1076..2b92b2fdb8 100644 >--- a/t/db_dependent/Circulation/Branch.t >+++ b/t/db_dependent/Circulation/Branch.t >@@ -46,6 +46,7 @@ my $dbh = C4::Context->dbh; > $dbh->do(q|DELETE FROM issues|); > $dbh->do(q|DELETE FROM items|); > $dbh->do(q|DELETE FROM borrowers|); >+$dbh->do(q|DELETE FROM clubs|); > $dbh->do(q|DELETE FROM branches|); > $dbh->do(q|DELETE FROM categories|); > $dbh->do(q|DELETE FROM accountlines|); >@@ -270,9 +271,11 @@ is( $messages->{NeedsTransfer}, $samplebranch1->{branchcode}, "AddReturn respect > $query = > "INSERT INTO issues (borrowernumber,itemnumber,branchcode) VALUES( ?,?,? )"; > $dbh->do( $query, {}, $borrower_id1, $item_id3, $samplebranch1->{branchcode} ); >+t::lib::Mocks::mock_preference( 'item-level_itypes', 1 ); > ($doreturn, $messages, $iteminformation, $borrower) = AddReturn('barcode_3', > $samplebranch1->{branchcode}); > is($messages->{NeedsTransfer},undef,"AddReturn respects branch item return policy - noreturn"); >+t::lib::Mocks::mock_preference( 'item-level_itypes', 0 ); > > $schema->storage->txn_rollback; > >-- >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 19070
:
65785
|
65827
| 65842