Testing the 'recordpayment' function in C4::Accounts TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/Accounts.t -- All 15 tests should run successfully without any error or warning
Created attachment 37430 [details] [review] Bug 13942 : Testing the 'recordpayment' function in C4::Accounts TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/Accounts.t -- All 15 tests should run successfully without any error or warning
Created attachment 37439 [details] [review] Bug 13942 : Testing the 'recordpayment' function in C4::Accounts TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/Accounts.t -- All 15 tests should run successfully without any error or warning Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
I received the following when I ran the unit tests with an installation using the sample data: prove -v t/db_dependent/Accounts.t t/db_dependent/Accounts.t .. 1..15 ok 1 - use C4::Accounts; ok 2 - use Koha::Object; ok 3 - use Koha::Borrower; ok 4 - use Data::Dumper; ok 5 - C4::Accounts->can(...) DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_kohaqa`.`issues`, CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON UPDATE CASCADE) at t/db_dependent/Accounts.t line 53. DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails (`koha_kohaqa`.`issues`, CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON UPDATE CASCADE) at t/db_dependent/Accounts.t line 53. # Looks like you planned 15 tests but ran 5. # Looks like your test exited with 255 just after 5. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 10/15 subtests Test Summary Report ------------------- t/db_dependent/Accounts.t (Wstat: 65280 Tests: 5 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 15 tests but ran 5. Files=1, Tests=5, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.46 cusr 0.04 csys = 0.52 CPU) Result: FAIL
(In reply to Kyle M Hall from comment #3) > I received the following when I ran the unit tests with an installation > using the sample data: > prove -v t/db_dependent/Accounts.t > t/db_dependent/Accounts.t .. > 1..15 > ok 1 - use C4::Accounts; > ok 2 - use Koha::Object; > ok 3 - use Koha::Borrower; > ok 4 - use Data::Dumper; > ok 5 - C4::Accounts->can(...) > DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign > key constraint fails (`koha_kohaqa`.`issues`, CONSTRAINT `issues_ibfk_1` > FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON > UPDATE CASCADE) at t/db_dependent/Accounts.t line 53. This is because you have issues in your DB, so not the default sample data :) But this needs to be fixed anyway.
Created attachment 37600 [details] [review] Bug 13942 : Testing the 'recordpayment' function in C4::Accounts for Kyle M Hall : Adding removal of the 'issues' table TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/Accounts.t -- All 15 tests should run successfully without any error or warning
Created attachment 37645 [details] [review] [PASSED QA] Bug 13942 : Testing the 'recordpayment' function in C4::Accounts for Kyle M Hall : Adding removal of the 'issues' table TEST PLAN --------- 1. Apply patch 2. prove -v t/db_dependent/Accounts.t -- All 15 tests should run successfully without any error or warning Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Tests pushed to master. Good job Julian!