X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=t%2FCirculation_barcodedecode.t;h=5090e9bc84388cabd7d77c2b57ddb6e4de3c941e;hb=ef6bc21b2c4ebe04f6d22d081e447f6bb2955029;hp=9c4a6e6c04668d90bb125264cd980dde27a1e4e4;hpb=f098258e8cf2d616c6bbc35e44c6a1df47be8517;p=koha-ffzg.git diff --git a/t/Circulation_barcodedecode.t b/t/Circulation_barcodedecode.t index 9c4a6e6c04..5090e9bc84 100644 --- a/t/Circulation_barcodedecode.t +++ b/t/Circulation_barcodedecode.t @@ -1,14 +1,31 @@ #!/usr/bin/perl + +# This file is part of Koha. +# +# 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 strict; -use warnings; +use Test::More tests => 26; +use t::lib::Mocks; -use Test::More tests => 24; C4::Context->_new_userenv(123456); C4::Context->set_userenv(1,'kmkale' , 1, 'kk1' , 'IMS', 0, 'kmkale@anantcorp.com'); BEGIN { + # Mock the DB connexion and C4::Context + my $context = t::lib::Mocks::mock_dbh; use_ok('C4::Circulation'); } @@ -18,6 +35,7 @@ our %inputs = ( whitespace => [" 26002315", "26002315 ", "\n\t26002315\n"], 'T-prefix' => [qw(T0031472 T32)], 'libsuite8' => ['b000126', 'b12', 'B0126', 'IMS-B-126', 'ims-b-126','CD0000024','00123','11998'], + EAN13 => [qw(892685001928 695152)], other => [qw(26002315 T0031472 T32 Alphanum123), "Alpha Num 345"], ); our %outputs = ( @@ -25,6 +43,7 @@ our %outputs = ( whitespace => [qw(26002315 26002315 26002315)], 'T-prefix' => [qw(T0031472 T0000002 )], 'libsuite8' => ['IMS-b-126', 'IMS-b-12', 'IMS-B-126', 'IMS-B-126', 'ims-b-126','IMS-CD-24','IMS-b-123','IMS-b-11998'], + EAN13 => [qw(0892685001928 0000000695152)], other => [qw(26002315 T0031472 T32 Alphanum123), "Alpha Num 345"], );