Bug 34812

Summary: Remove Test::DBIx::Class from Koha.t
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 34336    
Attachments: Bug 34812: Remove Test::DBIx from Koha.t
Bug 34812: Move subtests to db_dependent/Koha.t
Bug 34812: Remove Test::DBIx from Koha.t
Bug 34812: Move subtests to db_dependent/Koha.t

Description Marcel de Rooy 2023-09-18 07:02:22 UTC

    
Comment 1 Marcel de Rooy 2023-09-18 09:12:20 UTC
Created attachment 155778 [details] [review]
Bug 34812: Remove Test::DBIx from Koha.t

The DBIx fixture here is replaced by a simple mock on Libraries.
getFacets only needs the count of libraries.
Feels better than removing all libraries here..

Note: Moved tests at 'root level' to a new subtest.

Test plan:
Run t/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2023-09-18 09:12:22 UTC
Created attachment 155779 [details] [review]
Bug 34812: Move subtests to db_dependent/Koha.t

Note that a few isbn tests were identical.
Tidied the three moved subtests here.

Test plan:
Run t/db_dependent/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Marcel de Rooy 2023-09-18 09:12:52 UTC
Taking the liberty to move this to SO. Just run the test.
Comment 4 Martin Renvoize (ashimema) 2023-09-18 10:47:52 UTC
Created attachment 155796 [details] [review]
Bug 34812: Remove Test::DBIx from Koha.t

The DBIx fixture here is replaced by a simple mock on Libraries.
getFacets only needs the count of libraries.
Feels better than removing all libraries here..

Note: Moved tests at 'root level' to a new subtest.

Test plan:
Run t/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2023-09-18 10:47:55 UTC
Created attachment 155797 [details] [review]
Bug 34812: Move subtests to db_dependent/Koha.t

Note that a few isbn tests were identical.
Tidied the three moved subtests here.

Test plan:
Run t/db_dependent/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2023-09-18 10:48:27 UTC
Nice bit of tidying up.. works as expected.. Passing QA
Comment 7 Tomás Cohen Arazi (tcohen) 2023-09-18 15:06:09 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-09-18 21:06:28 UTC
Enhancement not pushed to 23.05.x