Koha-clms/t/db_dependent/Koha
Marcel de Rooy e1afa469f8 Bug 18361: [QA Follow-up] Resolve warning on undef values supplied
The following warning was raised in Letters.t:
DBIx::Class::ResultSource::_minimal_valueset_satisfying_constraint():
NULL/undef values supplied for requested unique constraint 'primary' (NULL
values in column(s): 'id'). This is almost certainly not what you wanted,
though you can set DBIC_NULLABLE_KEY_NOWARN to disable this warning.

This warning is triggered by this line in C4/Letters.pm:
    Koha::SMS::Providers->find( $member->{'sms_provider_id'} );
As you already guessed, the sms_provider_id returns undef.

Resolved in sub find by testing if there are parameters and if so, they
should not be all undefined. (In most cases there will be only one
parameter; but this report is about composite keys.)

Added a trivial test case in Objects.t too.

Test plan:
Run t/db_dependent/Koha/Object.t
Run t/db_dependent/Koha/Objects.t
Run t/db_dependent/Letters.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2017-06-16 11:52:18 -03:00
..
Acquisition Bug 16053: Add tests 2016-03-21 21:35:04 +00:00
Filter Bug 18579: Fix call to append_fields, fix tests 2017-05-12 08:43:18 -04:00
Item Bug 16686: Add test for Koha::Item::Transfer[s] and Koha::Item->get_transfer 2016-09-02 13:56:03 +00:00
Patron Bug 18461: Make tests break on wrong UTF8 data handilng 2017-04-28 06:24:22 -04:00
SearchEngine Bug 9988: Add extract_biblionumber to Koha/SearchEngine 2017-04-13 08:53:46 -04:00
Authorities.t Bug 9988: [QA Follow-up] Satisfy QA issues 2017-04-13 08:53:47 -04:00
BiblioFrameworks.t Bug 16155: [QA Follow-up] Add transaction to BiblioFrameworks.t 2016-05-04 13:47:58 +00:00
BiblioUtils.t Bug 12478: fix some issues on rebase 2016-04-26 20:20:09 +00:00
Biblios.t Bug 17736: [Follow-up] Rename to current_holds 2017-03-31 12:02:14 +00:00
Checkouts.t Bug 18401: Add new method Koha::Checkout->patron 2017-04-28 08:58:46 -04:00
Cities.t Bug 15081: (followup) Make test files using TestBuilder handle their transactions 2015-11-04 12:32:57 -03:00
CsvProfiles.t Bug 8612: [Follow-up] Make usage and type different columns in table 2017-06-05 12:02:08 -03:00
GetDailyQuote.t Bug 18767: Remove useless diags from GetDailyQuote.t 2017-06-09 11:55:35 -03:00
IsKohaFieldLinked.t Bug 12874: A DB field without a default mapping is set to a default value on editing 2014-10-11 12:57:11 -03:00
IssuingRules.t Bug 17783: Replace ok with is 2016-12-23 12:01:57 +00:00
ItemTypes.t Bug 17944: QA follow-up 2017-06-05 11:59:11 -03:00
Items.t Bug 18402: Add the Koha::Item->checkout method 2017-04-28 09:01:35 -04:00
Libraries.t Bug 15629: Koha::Libraries - Remove GetBranchesInCategory (1) 2016-02-24 03:55:05 +00:00
MarcSubfieldStructures.t Bug 17249: Remove GetKohaAuthorisedValuesFromField - Add classes MarcSubfieldStructure[s] 2016-10-21 15:13:55 +00:00
News.t Bug 17960: Add opac_news.content values in tests 2017-02-06 17:42:13 +00:00
Notices.t Bug 17958: Add tests for Koha::Notice::Template[s] 2017-02-17 11:44:34 +00:00
Object.t Bug 18174: Add update to Koha::Object 2017-03-31 14:13:53 +00:00
Objects.t Bug 18361: [QA Follow-up] Resolve warning on undef values supplied 2017-06-16 11:52:18 -03:00
Patrons.t Bug 18314: Add tests 2017-05-12 10:58:54 -04:00
Ratings.t Bug 17089: [QA Follow-up] Add some test descriptions to Ratings.t 2016-09-09 09:31:30 +00:00
Reviews.t Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview 2016-09-09 10:29:57 +00:00
SMS_Providers.t Bug 9021 [QA Followup] - Unit tests 2016-02-14 12:40:07 +00:00
Suggestions.t Bug 14757: Add tests for new modules 2016-07-08 13:47:42 +00:00