[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 31 16:56:31 CEST 2022


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

--- Comment #134 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Comment on attachment 138804
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138804
Bug 29697: WIP - fix t/db_dependent/Search.t

Review of attachment 138804:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=29697&attachment=138804)
-----------------------------------------------------------------

::: t/db_dependent/Search.t
@@ +472,5 @@
> +    Koha::Database::flush_schema_cache();
> +    fixtures_ok [
> +        Item => [
> +            [qw( itemnumber )],
> +            [ 1 ],

Getting picky but... This is not entirely correct.
When you look at data/marc21/zebraexport/large_biblio/exported_records.xml you
see there are 4 items defined on that record. The itemnumbers for them are 123,
124, 125 and 126. Two of them are set to be not for loan (i.e. $7 1 in this
case). That's why the test is expecting exactly 2 in the notforloancount return
value for searchResults.

This mock on the resultset 'fixes' the tests only because the ->count is
returning 2, so unrelated to the actual itemnumbers.

I think we should just do some simpler mocking. Will give it a try.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list