Bug 16942 [QA Followup] - Add unit test

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2016-07-26 15:00:58 +00:00
parent 49af4e0ddf
commit 49df1cc10f
2 changed files with 19 additions and 2 deletions

View File

@ -2026,7 +2026,7 @@ sub _koha_notify_reserve {
'biblio' => $biblionumber,
'biblioitems' => $biblionumber,
'reserves' => $reserve,
'items', $reserve->{'itemnumber'},
'items' => $reserve->{'itemnumber'},
},
substitute => { today => output_pref( { dt => dt_from_string, dateonly => 1 } ) },
);

View File

@ -18,7 +18,7 @@
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
use Test::More tests => 13;
use Test::More tests => 14;
use MARC::Record;
@ -188,6 +188,23 @@ $prepared_letter = GetPreparedLetter(
);
is( $prepared_letter->{content}, $hold->id(), 'Hold object used correctly' );
# Bug 16942
$prepared_letter = GetPreparedLetter(
(
module => 'test',
letter_code => 'TEST_HOLD',
tables => {
'branches' => $library,
'borrowers' => $patron,
'biblio' => $biblio->id,
'biblioitems' => $biblioitem->id,
'reserves' => $hold->unblessed,
'items' => $hold->itemnumber,
}
)
);
is( $prepared_letter->{content}, $hold->id(), 'Hold object used correctly' );
$sth->execute( "TEST_SERIAL", "[% serial.id %]" );
$prepared_letter = GetPreparedLetter(
(