Koha/t
Nick Clemens e46ab82e28 Bug 18990: Overdue Notices are not sending through SMS correctly
Bug 18478 fixed sms via email problems under the assumption that
to_address was either smsalertnumber or blank.

It seems overdues set the to_address to email. This patch changes the
code to enforce that an sms sent with emial driver will use the
smsalertnumebr and provider defined for the borrower, regardless of what
is set in the queue

To test:
 1 - Define a messaging prefs for a patron to recieve hold notices via
  SMS
 2 - Ensure you have defined an SMS message for an overdue letter
 3 - Set an SMS alert number for patron
 4 - Set the SMS::Send driver to 'Email'
 5 - Checkout an item as overdue to trigger notice above
 6 - Run overdue_notices.pl
 6 - Check the db and note the address is email
 7 - run process_message_queue.pl
 8 - Check db - address is email followed by service provider
 9 - Apply patch
 10 - repeat
 11 - Message to_address should be populated with smsalertnumber

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-07 09:37:11 -03:00
..
Acquisition Bug 18756 - add Unit Test 2017-07-06 14:29:02 -03:00
Biblio Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Budgets Bug 18942: (QA followup) Add new tests descriptions 2017-07-17 15:52:01 -03:00
Circulation Bug 17557: Koha::Patrons - Move GetAge to ->set_age (and remove SetAge) 2016-12-16 11:57:38 +00:00
db_dependent Bug 18990: Overdue Notices are not sending through SMS correctly 2017-12-07 09:37:11 -03:00
edi_testfiles Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
etc Bug 18286: [Follow-up] Add t/etc/schema.pl 2017-06-05 17:52:35 -03:00
External Bug 16636 [QA Followup] - Move tests to t/External 2016-06-10 18:02:14 +00:00
Koha Bug 16660: (followup) Unit tests 2017-10-27 14:09:02 -03:00
lib Bug 19176: (QA follow-up) few cosmetic changes 2017-11-03 13:50:27 -03:00
Members Bug 18851: Tests must be skipped in cardnumber.t if Test::DBIx::Class is not installed 2017-08-08 09:21:06 -03:00
Number Bug 18900: (QA followup) Make tests conditional to locale existence 2017-08-10 13:20:32 -03:00
Search Bug 16660: (followup) Unit tests 2017-10-27 14:09:02 -03:00
Serials Bug 16289: Refactore code and add tests 2016-06-10 18:09:48 +00:00
SIP Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Test Bug 19176: Fix how t::lib::Dates::compare handle timezone 2017-10-30 14:55:18 -03:00
00-checkdatabase-version.t Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
00-deprecated.t
00-load.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
00-merge-conflict-markers.t Bug 19335: Fix 00-merge-conflict-markers.t when dockerised 2017-09-19 09:00:49 -03:00
00-testcritic.t Bug 15258: Prevent unused declared variables 2015-12-30 17:24:30 -07:00
00-valid-xml.t Bug 16608 - Add xsd extension to t/00-valid-xml.t 2016-06-10 17:40:55 +00:00
Auth_with_shibboleth.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
AuthoritiesMarc_MARC21.t
AuthoritiesMarc_UNIMARC.t
AuthUtils.t Bug 18298: Add server-side checks and refactor stuffs 2017-10-16 09:44:32 -03:00
Barcodes_annual.t
Barcodes_EAN13.t
Barcodes_hbyymmincr.t
Barcodes_incremental.t
Biblio.t Bug 18712: (QA follow-up) Add count of tests 2017-11-26 13:00:03 -03:00
Biblio2.t Bug 16556 - KohaToMarcMapped columns sharing same field with biblio(item)number are removed. 2016-09-15 13:42:35 +00:00
Bookseller.t
Boolean.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Budgets.t
Cache.t Bug 16769: Uniformise calls to Koha::Cache->set_in_cache 2016-10-10 17:03:54 +00:00
Calendar.t Bug 18712: Remove unecessary fixtures 2017-11-26 13:00:03 -03:00
Charset.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
check_kohastructure.t Bug 19422: Make sure it will never happen again 2017-10-13 13:58:04 -03:00
Circulation_barcodedecode.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
ClassSortRoutine.t
ClassSortRoutine_Dewey.t Bug 8837 [QA Followup] - Add unit tests 2014-10-28 09:39:44 -03:00
ClassSortRoutine_Generic.t
ClassSortRoutine_LCC.t
ClassSource.t
Context.t Bug 14751: [QA Follow-up] Unit tests for interface method 2016-03-02 04:21:26 +00:00
Contract.t
Creators.t Bug 16622: some tests triggered by prove t fail for unset KOHA_CONF 2016-08-05 06:09:58 +00:00
DateUtils.t Bug 17502: Throw some exceptions in output_pref 2017-04-21 07:36:25 -04:00
Debug.t Bug 14114: Silence warns and cleanup t/Debug.t 2015-05-22 09:33:34 -03:00
dummy.t
Edifact.t Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
EdiInvoice.t Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
Ediorder.t Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
Ediordrsp.t Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
Form_MessagingPreferences.t
Heading.t
HtmlTags.t Bug 18665: Add test for HtmlTags.pm 2017-06-21 11:22:19 -03:00
Images.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
ImportBatch.t Bug 10407: Add two subtests to t/ImportBatch.t 2016-09-02 16:00:13 +00:00
Installer_PerlDependencies.t
Installer_PerlModules.t Bug 17990: Refactor Perl module versions check 2017-02-17 12:13:44 +00:00
Installer_pm.t Bug 17990: Refactor Perl module versions check 2017-02-17 12:13:44 +00:00
ItemCirculationAlertPreference.t
Koha.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Koha_Email.t Bug 13172 t/Koha_Email.t was database dependent 2014-10-31 12:10:32 -03:00
Koha_ExternalContent_OverDrive.t Bug 18851: (QA followup) Test doesn't need sessions on DB 2017-08-08 09:21:06 -03:00
Koha_MetadataRecord.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Koha_Template_Plugin_Cache.t Bug 11452: Add unit tests for Koha::Template::Plugin::Cache 2014-01-10 15:42:23 +00:00
Koha_Template_Plugin_Koha.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Koha_Util_FrameworkPlugin.t Bug 13437: Preliminary changes for marc21 plugins field 008 2015-06-10 12:51:26 -03:00
Koha_Util_MARC.t Bug 8064: Fix unit tests for createMergeHash 2015-11-09 15:08:57 -03:00
Labels.t Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Labels_split_ccn.t Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Labels_split_ddcn.t Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Labels_split_lccn.t Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Languages.t Bug 16675: fix breakage of t/Languages.t 2016-06-10 17:03:10 +00:00
Letters.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Log.t Bug 11537: (follow-up) mock C4::Context::preference 2014-01-14 19:27:07 +00:00
Logger.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Makefile.t Bug 19067: Test Makefile.PL mapping 2017-08-10 11:25:33 -03:00
Matcher.t Bug 18712: Fix t/Matcher.t if DB is empty 2017-11-26 13:00:03 -03:00
Members_Attributes.t Bug 12267: Remove borrower_attributes.password 2016-04-22 23:08:32 +00:00
Members_AttributeTypes.t Bug 18226 - Remove "use Test::DBIx::Class" instantiations' dangerous code duplication 2017-06-05 17:52:48 -03:00
Members_Messaging.t
NorwegianPatronDB.t Bug 18226 - Remove "use Test::DBIx::Class" instantiations' dangerous code duplication 2017-06-05 17:52:48 -03:00
OpenLibrarySearch.t Bug 16649: Make OpenLibrarySearch test pass even if launches offline 2016-06-10 17:05:03 +00:00
Output.t Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
Output_JSONStream.t Bug 11480: Fix invalid assumptions in JSONStream test 2014-01-10 15:42:17 +00:00
Patron.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Patroncards.t
Patroncards_Batch.t
Patroncards_Layout.t
Patroncards_Lib.t
Patroncards_Patroncard.t
Patroncards_Profile.t
Patroncards_Template.t
perlcriticrc Bug 15258: Prevent unused declared variables 2015-12-30 17:24:30 -07:00
Prices.t Bug 18289 - Fix t/Prices.t having a Test::DBIx::Class cache issue 2017-06-05 17:52:49 -03:00
Print.t bug 11542: Increase test coverage for Print.pm 2014-01-14 20:41:31 +00:00
QueryParser.t Bug 12647: PQF QueryParser driver and unit tests fixes 2014-08-11 10:09:38 -03:00
RecordProcessor.t Bug 15871: Improve PerlCritic level for t/RecordProcessor.t 2016-03-03 22:02:50 +00:00
Ris.t Bug 16668: Fix t/Ris.t tests 2016-06-10 16:59:20 +00:00
Scheduler.t
Scrubber.t Bug 14116: Silence noisy output for t/Scrubber. 2015-06-01 14:10:56 -03:00
Search.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Search_PazPar2.t Bug 14117: Silence warnings t/SearchPazPar2.t 2015-06-01 14:10:14 -03:00
SimpleMARC.t Bug 14098: Implement the copy_and_replace action for MTT 2015-09-07 11:17:13 -03:00
smolder_smoke_signal
SMS.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
SocialData.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Stats.t
SuggestionEngine.t
SuggestionEngine_AuthorityFile.t Bug 9857: Fix failing tests 2017-09-01 16:22:02 -03:00
TmplToken.t
Token.t Bug 18124: [Follow-up] Handle default parameters in a sub 2017-03-30 09:07:08 +00:00
XSLT.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00