https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40391
--- Comment #10 from Kyle M Hall (khall) <[email protected]> --- Created attachment 189573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189573&action=edit Bug 40391: Add unit tests for GIR:LSL support in EDI This adds unit tests for adding support for the new LSL field: - GIR segment extraction tests in t/Edifact.t for sub_location_code field mapping - Validation function tests in t/db_dependent/Koha/EDI.t for location/collection code validation - Copy function tests in t/db_dependent/Koha/EDI.t for location/collection code assignment - gir_segments generation tests in t/db_dependent/Koha/Edifact/Order.t for preference handling Tests cover: - LSL field extraction from GIR segments alongside existing LSQ fields - Independent LSQ/LSL preference mapping (location/ccode/empty combinations) - Validation of location and collection codes against authorised values - Error handling and message formatting - Backwards compatibility with existing LSQ-only configurations - Edge cases including missing data and invalid preference values - LSL maps to location, LSQ maps to ccode - LSL maps to ccode, LSQ maps to location (swapped configuration) - Only LSL field present (LSQ empty) - Only LSQ field present (LSL empty) - Both LSL and LSQ map to location (edge case) - Both fields disabled Test plan: 1. Apply this patch 2. Run: prove t/Edifact.t - Should pass with 8 new LSL-related tests included 3. Run: prove t/db_dependent/Koha/EDI.t - Should pass with 16 new validation function tests 4. Run: prove t/db_dependent/Koha/Edifact/Order.t - Should pass with 14 new gir_segments LSL/LSQ tests 5. Verify all existing tests still pass - no regression Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: Hannah Dunne-Howrie <[email protected]> Signed-off-by: Kyle M Hall <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
