https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383

--- Comment #20 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 192527
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192527&action=edit
Bug 40383: Add unit tests for Koha::Edifact to_json method

This patch adds unit tests for the new to_json method being introduced
in Koha::Edifact module in the next patch.

The tests verify:
- JSON output generation and validity
- Proper structure with header, messages, and trailer fields
- Message array structure with correct number of messages
- Individual message structure (header, segments, trailer)
- Segment data integrity including raw data and elements arrays
- Line ID functionality for related segments (LIN, QTY, PRI, PIA)

Test plan:
1. Apply this patch and the next one
2. Run: prove t/Edifact.t
3. Verify all 63 tests pass
4. Confirm the new JSON-related tests (22 tests) execute successfully

Sponsored-by: Martin Renvoize <[email protected]>
Signed-off-by: Hannah Dunne-Howrie <[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/

Reply via email to