Lines 2-8
Link Here
|
2 |
use strict; |
2 |
use strict; |
3 |
use warnings; |
3 |
use warnings; |
4 |
use DBI; |
4 |
use DBI; |
5 |
use Test::More tests => 15; |
5 |
use Test::More tests => 10; |
6 |
use Test::MockModule; |
6 |
use Test::MockModule; |
7 |
|
7 |
|
8 |
BEGIN { |
8 |
BEGIN { |
Lines 40-46
my ($nextnum, $scr, $history);
Link Here
|
40 |
|
40 |
|
41 |
($nextnum, $scr) = C4::Barcodes::ValueBuilder::incremental::get_barcode(\%args); |
41 |
($nextnum, $scr) = C4::Barcodes::ValueBuilder::incremental::get_barcode(\%args); |
42 |
is($nextnum, 33333074344564, 'incremental barcode'); |
42 |
is($nextnum, 33333074344564, 'incremental barcode'); |
43 |
ok(length($scr) == 0, 'incremental javascript'); |
43 |
is($scr, undef, 'incremental javascript'); |
44 |
|
44 |
|
45 |
# This should run exactly one query so we can test |
45 |
# This should run exactly one query so we can test |
46 |
$history = $dbh->{mock_all_history}; |
46 |
$history = $dbh->{mock_all_history}; |
Lines 70-76
$dbh->{mock_add_resultset} = $annualdata;
Link Here
|
70 |
$dbh->{mock_clear_history} = 1; |
70 |
$dbh->{mock_clear_history} = 1; |
71 |
($nextnum, $scr) = C4::Barcodes::ValueBuilder::annual::get_barcode(\%args); |
71 |
($nextnum, $scr) = C4::Barcodes::ValueBuilder::annual::get_barcode(\%args); |
72 |
is($nextnum, '2012-0035', 'annual barcode'); |
72 |
is($nextnum, '2012-0035', 'annual barcode'); |
73 |
ok(length($scr) == 0, 'annual javascript'); |
73 |
is($scr, undef, 'annual javascript'); |
74 |
|
74 |
|
75 |
# This should run exactly one query so we can test |
75 |
# This should run exactly one query so we can test |
76 |
$history = $dbh->{mock_all_history}; |
76 |
$history = $dbh->{mock_all_history}; |
77 |
- |
|
|