From 931e137a0b9304b4678798a957465b055fd67217 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Sat, 8 Feb 2014 10:25:57 +0100 Subject: [PATCH] Revert "Bug 11208: regression test for failing SMS messages" This reverts commit c4f6a2777d7f068d3c072352832c48461689431c. Bug 11208 depends on Bug 9016 which is for 3.16 --- t/db_dependent/Letters.t | 71 ---------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 t/db_dependent/Letters.t diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t deleted file mode 100644 index 77383594b0..0000000000 --- a/t/db_dependent/Letters.t +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl - -# This file is part of Koha. -# -# Copyright (C) 2013 Equinox Software, Inc. -# -# Koha is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# Koha is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Koha; if not, see . - -use Modern::Perl; - -use Test::More tests => 4; - -use C4::Context; -use C4::Letters; -use C4::Members; - -my $dbh = C4::Context->dbh; - -# Start transaction -$dbh->{AutoCommit} = 0; -$dbh->{RaiseError} = 1; - -$dbh->do('DELETE FROM message_queue'); - -my $borrowernumber = AddMember( - firstname => 'Jane', - surname => 'Smith', - categorycode => 'PT', - branchcode => 'CPL', -); - -my $message_id = C4::Letters::EnqueueLetter({ - borrowernumber => $borrowernumber, - message_transport_type => 'sms', - to_address => 'to@example.com', - from_address => 'from@example.com', - letter => { - content => 'a message', - title => 'message title', - metadata => 'metadata', - code => 'TEST_MESSAGE', - content_type => 'text/plain', - }, -}); - -ok(defined $message_id && $message_id > 0, 'new message successfully queued'); - -my $messages_processed = C4::Letters::SendQueuedMessages(); -is($messages_processed, 1, 'all queued messages processed'); - -my $messages = C4::Letters::GetQueuedMessages({ borrowernumber => $borrowernumber }); -is(scalar(@$messages), 1, 'one message stored for the borrower'); - -is( - $messages->[0]->{status}, - 'failed', - 'message marked failed if tried to send SMS message for borrower with no smsalertnumber set (bug 11208)' -); - -$dbh->rollback; -- 2.39.5