Koha-clms/t/db_dependent
Mark Tompsett 1be7fb5e12 Bug 16868: Silence error t/db_dependent/Linker_FirstMatch.t
When the auth_header table has records which exclude 1xx and
2xx tags, the $bibfield doesn't match anything. This in turn
sets it to undef, which triggers an error on the next line
killing the test.

This was completely refactored to provide the data necessary
for the tests to pass, and to be more comprehensive (both MARC
and UNIMARC are tested). The tests are then run.

C4::Headings::authorities is mocked, so that this test is not
dependent on a search engine.

TEST PLAN
---------
1) back up DB
2) DELETE FROM auth_header;
3) SOURCE auth_header.sql;
   -- the provided file
4) prove t/db_dependent/Linker_FirstMatch.t
   -- should barf before running all the tests
5) apply all patches
6) prove t/db_dependent/Linker_FirstMatch.t
   -- should work happy
7) run koha qa test tools
8) restore your backup

Followed test plan, behaves as expected.
Signed-off-by: Marc <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-08-04 20:04:24 +00:00
..
Acquisition Bug 15531: (followup) Use a quantity of 1, not null, for standing orders 2016-04-29 13:07:18 +00:00
Auth
…
Biblio
…
Circulation Bug 16405: Fix Circulation/NoIssuesChargeGuarantees.t test 2 2016-05-04 14:23:34 +00:00
Creators
…
Exporter
…
Holds Bug 15534 [QA Followup] - Remove superfluous lines from unit tests 2016-04-29 10:35:06 +00:00
Items Bug 16607: Remove CPL/MPL from two unit tests 2016-06-17 14:44:39 +00:00
Koha Bug 15451: Add the 2 new modules Koha::CsvProfile[s] 2016-07-22 17:18:34 +00:00
LDAP
…
Labels
…
Letters Bug 14757 [QA Followup] - Add Unit Tests 2016-07-08 13:47:42 +00:00
Members Bug 16889: Remove C4::Members::columns and use Koha::Patrons->columns instead 2016-07-15 18:12:12 +00:00
OAI Bug 16172: fix OAI Server tests broken by bug 15946 2016-03-31 16:51:38 +00:00
Patron Bug 16849: Move IsDebarred to Koha::Patron->is_debarred 2016-07-15 18:08:14 +00:00
Record
…
Reports Bug 12787 [QA Followup] - Retain change to Reports_Guided.t 2016-04-22 00:54:36 +00:00
Reserves
…
SIP Bug 15006: Centralize timeout logic and allow zero client timeout 2016-07-15 14:11:05 +00:00
Search
…
Serials Bug 12178: Update serial status to "claimed" when exporting to CSV 2016-07-15 14:07:40 +00:00
Template/Plugin Bug 12787: Reorganise t/db_dependent files 2016-04-22 00:54:35 +00:00
Utils Bug 16316 - QA FOLLOWUP - Add tests 2016-04-29 15:53:25 +00:00
XSLT_Handler
…
api/v1 Bug 16271: Allow more filters on /api/v1/holds 2016-07-08 14:18:19 +00:00
data
…
selenium Bug 13691: Add changes for 3.22 2016-07-08 20:36:57 +00:00
www Bug 10171: (QA followup) Make search tests use the right form 2016-05-04 14:14:50 +00:00
00-strict.t
…
Accounts.t Bug 16607: Remove CPL/MPL from two unit tests 2016-06-17 14:44:39 +00:00
Acquisition.t Bug 16934: Add test for ModOrder 2016-07-22 17:13:17 +00:00
AdditionalField.t
…
Amazon.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
AudioAlerts.t
…
Auth.t Bug 16853: Move changepassword to Koha::Patron->update_password 2016-07-15 18:09:17 +00:00
Auth_with_cas.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
Auth_with_ldap.t Bug 14144: Clean ups and refactors 2016-04-29 12:40:16 +00:00
AuthorisedValues.t
…
AuthoritiesMarc.t
…
BackgroundJob.t
…
Barcodes.t Bug 15878 - Updated unit tests for hbyymmincr barcodes 2016-05-23 17:42:10 +00:00
Barcodes_ValueBuilder.t
…
Biblio.t Bug 16431: Use Koha::Cache to cache marc subfield structure 2016-07-08 12:44:58 +00:00
Bookseller.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
Branch.t
…
Breeding.t
…
Budgets.t Bug 15009 [QA Followup] - Update number of tests run 2016-04-29 13:01:07 +00:00
Category.t
…
Charset.t
…
Circulation.t Bug 16534: Add tests for AddIssue 2016-06-24 11:45:00 +00:00
ClassSource.t Bug 16860: Remove the comment about the warning 2016-07-08 13:29:50 +00:00
ColumnsSettings.t Bug 16177: Fix tests for ColumnsSsettings.t 2016-04-01 19:08:23 +00:00
Context.t Bug 16813: Allow empty string for OPACBaseURL 2016-07-15 15:02:13 +00:00
Contract.t
…
CourseReserves.t
…
DecreaseLoanHighHolds.t Bug 11565 - decreaseLoanHighHolds needs Override 2016-04-29 12:11:44 +00:00
Filter_MARC_ViewPolicy.t Bug 15870: Follow up to address comment #20 2016-03-24 20:15:40 +00:00
Fines.t
…
FrameworkPlugin.t
…
Heading_MARC21.t
…
Hold.t Bug 16609: Catch warning from Koha::Hold in Hold.t 2016-06-10 17:42:03 +00:00
Holds.t Bug 16717: Improve variable naming 2016-06-17 14:45:35 +00:00
HoldsQueue.t Bug 16671: [QA Follow-up] Replace remaining itemtype lines 2016-07-08 12:47:14 +00:00
Holidays.t Bug 15333: [QA Follow-up] Add few tests 2016-05-25 22:18:28 +00:00
ILSDI_Services.t Bug 16155: (QA followup) fix small bug in t/db_dependent/ILSDI_Services.t 2016-05-04 13:47:58 +00:00
ImportBatch.t Bug 9259: Use is instead of is_deeply 2016-07-08 13:43:53 +00:00
Installer.t
…
Items.t Bug 16431: Use Koha::Cache to cache marc subfield structure 2016-07-08 12:44:58 +00:00
KitchenSinkPlugin.kpz
…
Koha.t Bug 16157: Move the selected flag from GetAuthorisedValues to the templates 2016-04-07 00:16:09 +00:00
Koha_Authority.t
…
Koha_Database.t
…
Koha_ElasticSearch.t Bug 12478 Shifting tests and adding copyright headers 2016-04-26 20:20:13 +00:00
Koha_ElasticSearch_Indexer.t Bug 16453: Make Elasticsearch tests be skipped if configuration entry missing 2016-05-06 03:47:05 +00:00
Koha_Misc_Files.t
…
Koha_SearchEngine_Elasticsearch_Search.t Bug 16453: Make Elasticsearch tests be skipped if configuration entry missing 2016-05-06 03:47:05 +00:00
Koha_borrower_modifications.t Bug 16407: Simplify comments 2016-05-03 15:28:23 +00:00
Languages.t Bug 16866: Catch warning t/db_dependent/Languages.t 2016-07-08 14:50:18 +00:00
Letters.t Bug 16805: Tweak new test message to say getalert 2016-07-08 14:45:04 +00:00
Linker_FirstMatch.t Bug 16868: Silence error t/db_dependent/Linker_FirstMatch.t 2016-08-04 20:04:24 +00:00
Log.t
…
MarcModificationTemplates.t
…
Members.t Bug 16819: Unit tests for C4::Members::DelMember 2016-07-08 14:49:09 +00:00
MungeMarcPrice.t
…
NewsChannels.t Bug 16550: Clean the tests 2016-05-23 17:37:48 +00:00
Overdues.t
…
Passwordrecovery.t Bug 15585: Remove "shift on reference is experimental" warning 2016-03-22 23:08:21 +00:00
Patron.t Bug 14577 [QA Followup] 2016-04-29 11:54:23 +00:00
PatronLists.t Bug 16452: Remove the warnings raised by PatronLists.t 2016-05-05 20:44:47 +00:00
Patrons.t Bug 10459: Add tests for borrowers.updated_on 2016-06-10 17:10:23 +00:00
Plugins.t Bug 16502: Replace a few other ok-calls by is-calls 2016-06-17 14:32:40 +00:00
QueryParser.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
Ratings.t
…
Record.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
RecordProcessor_EmbedSeeFromHeadings.t
…
RefundLostItemFeeRule.t Bug 14048: (QA followup) Default to 1 if no default rule 2016-07-07 10:37:01 -06:00
Reports.t
…
Reserves.t Bug 14968 - Provides unit test 2016-07-08 12:42:59 +00:00
Review.t
…
RotatingCollections.t
…
Search.t Bug 16249: Zebra-specific tests should pass with ES disabled 2016-04-26 21:20:13 +00:00
Serials.t Bug 12178: Fix tests not to depend on dateformat syspref 2016-07-15 14:07:41 +00:00
Serials_2.t
…
Service.t
…
ShelfBrowser.t
…
Sitemapper.t Bug 16751: What is sitemaper? 2016-06-24 13:19:06 +00:00
Stats.t
…
SuggestionEngine_ExplodedTerms.t Bug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t 2016-07-08 13:08:09 +00:00
Suggestions.t Bug 16325: Add a test for SearchSuggestions when searching for STATUS='' 2016-05-05 20:46:01 +00:00
Tags.t
…
Templates.t
…
TestBuilder.t Bug 16890: Make TestBuilder generate date for date columns (and not datetime) 2016-07-15 14:59:46 +00:00
Upload.t Bug 16501: Remove some unneeded warns in Upload.t 2016-05-16 17:46:25 +00:00
UsageStats.t Bug 14048: (QA followup) Update syspref name for HEA 2016-07-07 10:37:01 -06:00
Virtualshelves.t
…
XISBN.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
XSLT_Handler.t
…
check_sysprefs.t
…
db_structure.t Bug 16173: db_structure.t shouldn't have a fixed number of tests 2016-04-01 19:14:53 +00:00
default_search_class.pl Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
rollingloans.t
…
sysprefs.t Bug 11998: Use Koha::Cache to cache sysprefs 2016-03-15 07:08:28 +00:00
zebra_config.pl
…