Bug 19979 - Search.t fails on facet info with one branch
Summary: Search.t fails on facet info with one branch
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2018-01-16 13:26 UTC by Marcel de Rooy
Modified: 2019-10-14 19:57 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19979: Fix get_facets_info test in Search.t (1.65 KB, patch)
2018-01-16 13:32 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 19979: Fix get_facets_info test in Search.t (1.69 KB, patch)
2018-02-27 14:40 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19979: ->count and be called directly on Koha::Objects (1.32 KB, patch)
2018-02-27 14:40 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2018-01-16 13:26:33 UTC

    
Comment 1 Marcel de Rooy 2018-01-16 13:32:20 UTC
Created attachment 70550 [details] [review]
Bug 19979: Fix get_facets_info test in Search.t

The test should remove the holdingbranch key in the expected results when
there is only one branch.
See the logic in C4::Koha.

Test plan:
[1] Run Search.t on a database with multiple branches.
[2] Run Search.t on a database with one branch. Without this patch the test
    would fail: Failed test '_get_facets_info returns the correct data'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Jonathan Druart 2018-02-27 14:40:49 UTC
Created attachment 72266 [details] [review]
Bug 19979: Fix get_facets_info test in Search.t

The test should remove the holdingbranch key in the expected results when
there is only one branch.
See the logic in C4::Koha.

Test plan:
[1] Run Search.t on a database with multiple branches.
[2] Run Search.t on a database with one branch. Without this patch the test
    would fail: Failed test '_get_facets_info returns the correct data'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2018-02-27 14:40:52 UTC
Created attachment 72267 [details] [review]
Bug 19979: ->count and be called directly on Koha::Objects

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2018-02-27 14:42:21 UTC
Trivial, skipping QA.
Comment 5 Jonathan Druart 2018-02-27 15:55:49 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 6 Nick Clemens 2018-03-23 12:49:29 UTC
Awesome work all! Pushed to stable for 17.11.04
Comment 7 Fridolin Somers 2018-03-27 09:58:47 UTC
Pushed to 17.05.x for v17.05.10