View | Details | Raw Unified | Return to bug 16443
Collapse All | Expand All

(-)a/t/db_dependent/Members/Statistics.t (-1 / +20 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
use Test::More tests => 2;
3
4
# Please add more tests here !!
5
6
use t::lib::Mocks;
7
8
use C4::Members::Statistics;
9
use Koha::Database; # we need the db here; get_fields looks for the item columns
10
11
my $schema = Koha::Database->schema;
12
$schema->storage->txn_begin;
13
14
t::lib::Mocks::mock_preference( 'StatisticsFields', undef );
15
is( C4::Members::Statistics::get_fields(), 'location|itype|ccode', 'Check default' );
16
17
t::lib::Mocks::mock_preference( 'StatisticsFields', 'barcode|garbagexxx|itemcallnumber|notexistent' );
18
is( C4::Members::Statistics::get_fields(), 'barcode|itemcallnumber', 'Check if wrong item fields were removed by get_fields' );
19
20
$schema->storage->txn_rollback;

Return to bug 16443