Summary: | t/Search.t does not do anything with Test::DBIx::Class | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Test Suite | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | fridolin.somers |
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,23.05.05,22.11.11
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 34336 | ||
Attachments: |
Bug 34968: Remove unneeded module from Search.t
Bug 34968: Remove unneeded module from Search.t |
Description
Marcel de Rooy
2023-09-30 06:37:20 UTC
Created attachment 156436 [details] [review] Bug 34968: Remove unneeded module from Search.t Test::DBIx::Class is not even used here. Just like C4::Biblio. We should remove TestBuilder too (this is t not t/db)! Test plan: Run t/Search.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Trivial (module cleanup): Self signoff Why remove these tests? -use_ok('C4::Search'); -can_ok('C4::Search', - qw/_build_initial_query/); (In reply to Katrin Fischer from comment #3) > Why remove these tests? > > -use_ok('C4::Search'); > -can_ok('C4::Search', > - qw/_build_initial_query/); Calling use_ok does not really add anything to our tests (here and in general too). We have a specific test that tests loading all modules in C4 and Koha in t/00-load.t. It will signal such a module. If the module would not load (and it would still be signed off..), the specific test will fail too anyway. For me the BEGIN blocks with use_ok are just unneeded ballast. We have no coding guideline to keep them and not one to remove them. It should not be a blocker for this report imo. Created attachment 156503 [details] [review] Bug 34968: Remove unneeded module from Search.t Test::DBIx::Class is not even used here. Just like C4::Biblio. We should remove TestBuilder too (this is t not t/db)! Test plan: Run t/Search.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 23.11. Nice work everyone, thanks! Pushed to 23.05.x for 23.05.05 Nice work everyone! Pushed to oldstable for 22.11.x |