Koha-clms/t/db_dependent
Tomas Cohen Arazi 4ffe7ddac0 Bug 24254: Compare itemlost with 0
On C4::Search and C4::Circulation the uses of the items.itemlost field
highlight the fact that the comparisson itemlost <= 0 was wrong, as it
is evaluated as a Perl boolean.

The column can only be an int and NOT NULL, so we need to check if it is
0 to ponder if not hidden.

This patch changes the tests to reflect this, and adjust the
Koha::Items->filter_by_visible_in_opac implementation to adapt to this.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
2021-01-29 18:42:31 +00:00
..
Acquisition
…
Auth
…
Authority
…
Biblio Bug 26516: Don't accept incorrect values for copyrightdate/publicationyear 2020-12-09 20:09:16 +00:00
Circulation Bug 21301: (QA follow-up) Fix number of tests 2021-01-20 01:47:55 +00:00
CourseReserves
…
Creators
…
Exporter
…
Holds Bug 24683: whole test formatted by 'perltidy' 2020-09-04 17:49:15 +00:00
Illrequest Bug 23632: Remove C4::Logs::GetLogs 2020-09-04 14:39:36 +00:00
Items
…
Koha Bug 24254: Compare itemlost with 0 2021-01-29 18:42:31 +00:00
LDAP
…
Labels
…
Letters
…
Members
…
OAI Bug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled 2020-11-10 22:55:49 +00:00
Patron Bug 26594: add Unit Test 2020-11-16 22:34:38 +00:00
Record Bug 26414: Tidy the tests 2020-10-20 13:56:35 +00:00
Reports
…
Reserves
…
SIP Bug 27196:[20.05.x] Don't explode if item that is waiting if checked in by SIP 2021-01-22 19:45:01 +00:00
Search Bug 24663: Remove authnotrequired if set to 0 2020-08-31 20:03:22 +00:00
Serials
…
Template/Plugin Bug 27002: Update callers for changed return 2020-12-14 14:42:53 +00:00
Utils
…
api/v1 Bug 27004: Prevent claim resolution to fail 2021-01-05 17:49:38 +00:00
cronjobs
…
data
…
selenium Bug 27055: Fix compatibility with newer Firefox+Selenium version 2021-01-05 13:48:12 +00:00
www
…
00-strict.t
…
01-test_dbic.t
…
Accounts.t Bug 26984: Make tests pass if AnonymousPatron is set 2020-12-09 21:47:36 +00:00
Acquisition.t
…
Amazon.t
…
ArticleRequests.t
…
AudioAlerts.t
…
Auth.t Bug 20804: Add tests 2020-11-13 14:32:44 +00:00
Auth_with_cas.t
…
Auth_with_ldap.t
…
AuthorisedValues.t
…
AuthoritiesMarc.t Bug 25313: (QA follow-up) DelAuthority tests 2020-12-09 21:15:42 +00:00
BackgroundJob.t
…
Barcodes.t
…
Barcodes_ValueBuilder.t
…
Biblio.t Bug 26518: (QA follow-up) Expect warnings, don't supress them 2020-12-14 15:24:46 +00:00
Breeding.t
…
Budgets.t
…
Cache.t Bug 16067: Remove FastMmap 2020-12-15 21:44:14 +00:00
Calendar.t
…
Charset.t
…
Circulation.t Bug 26593: Remove _get_discount_from_rule 2021-01-20 15:57:01 +00:00
Clubs.t
…
ColumnsSettings.t
…
Context.t
…
Contract.t
…
CourseReserves.t
…
DecreaseLoanHighHolds.t
…
Filter_MARC_ViewPolicy.t
…
Fines.t
…
FrameworkPlugin.t
…
Heading.t
…
Heading_MARC21.t
…
Hold.t
…
Holds.t
…
HoldsQueue.t Bug 18958: (Rmaint follow-up) Adjust number of tests 2020-10-16 17:00:17 +00:00
Holidays.t
…
ILSDI_Services.t Bug 21301: add unit tests 2021-01-20 01:48:22 +00:00
Illcomments.t
…
Illrequestattributes.t
…
Illrequests.t Bug 26114: Regression tests 2020-08-17 15:34:56 +00:00
ImportBatch.t
…
ImportExportFramework.t
…
Installer.t
…
Items.t Bug 27509: Prevent cn_sort value to be lost when editing items 2021-01-22 14:45:20 +00:00
Koha.t
…
Koha_Authority.t
…
Koha_Database.t
…
Koha_Elasticsearch.t
…
Koha_ExternalContent_OverDrive.t
…
Koha_ExternalContent_RecordedBooks.t
…
Koha_Misc_Files.t
…
Languages.t
…
Letters.t
…
LibraryGroups.t
…
Linker_Default.t
…
Linker_FirstMatch.t
…
Log.t Bug 23632: Remove C4::Logs::GetLogs 2020-09-04 14:39:36 +00:00
MarcModificationTemplates.t Bug 26894: Handle subfield 0 and delete empty fields 2021-01-22 16:50:02 +00:00
Members.t Bug 14708: Skip AnonymousPatron in GetBorrowersToExpunge 2020-12-09 21:38:24 +00:00
MungeMarcPrice.t
…
NewsChannels.t
…
Overdues.t Bug 27079: Unit tests 2020-12-14 15:35:28 +00:00
Passwordrecovery.t
…
PatronLists.t
…
Patroncards.t
…
Patrons.t Bug 25683: Patron with no accountlines should have 0 outstanding (not NULL) 2020-08-14 21:12:43 +00:00
Record.t
…
RecordProcessor_EmbedSeeFromHeadings.t
…
RefundLostItemFeeRule.t
…
Reports.t
…
Reserves.t Bug 18958: Make hold_fill_targets specific to reserves 2020-10-16 16:45:33 +00:00
RotatingCollections.t
…
Search.t Bug 26957: Unit tests 2021-01-29 14:25:15 +00:00
Serials.t
…
Serials_2.t
…
Service.t
…
ShelfBrowser.t
…
Sitemapper.t
…
Stats.t
…
StockRotationItems.t Bug 23432: (QA follow-up) Add a unit test 2020-11-13 18:29:37 +00:00
StockRotationRotas.t
…
StockRotationStages.t
…
SuggestionEngine_ExplodedTerms.t
…
Suggestions.t
…
Tags.t
…
Templates.t
…
TestBuilder.t
…
Upload.t
…
UsageStats.t
…
Virtualshelves.t
…
XISBN.t Bug 26364: Remove false matches on isbn 2021-01-14 13:10:59 +00:00
XSLT.t
…
check_kohastructure.t
…
check_sysprefs.t
…
db_structure.t
…
rollingloans.t
…
sysprefs.t
…
zebra_config.pl
…