Bug 19070: Fix Circulation/Branch.t
commitd2cceb95b47983b28242819c95e57439958b0da5
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 10 Aug 2017 07:04:16 +0000 (10 09:04 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Aug 2017 19:25:33 +0000 (10 16:25 -0300)
tree638bd5e3448b0a7471b11bd243354922d0628b09
parent8a328a20bf3a74268346104281688b2a81be80e6
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Circulation/Branch.t