Line 0
Link Here
|
0 |
- |
1 |
#!/usr/bin/perl |
|
|
2 |
|
3 |
use Modern::Perl; |
4 |
|
5 |
use C4::Context; |
6 |
use Koha::DateUtils; |
7 |
|
8 |
use Test::MockModule; |
9 |
use Test::More tests => 3; |
10 |
use t::lib::Mocks; |
11 |
|
12 |
BEGIN { |
13 |
use_ok('Koha::Template::Plugin::ColumnsSettings', "Can use Koha::Template::Plugin::ColumnsSettings"); |
14 |
} |
15 |
|
16 |
ok( my $settings = Koha::Template::Plugin::ColumnsSettings->new(), 'Able to instantiate template plugin' ); |
17 |
|
18 |
subtest "is_hidden" => sub { |
19 |
plan tests => 2; |
20 |
|
21 |
is( $settings->is_hidden('opac', 'biblio-detail', 'holdingst', 'item_materials'), 1, 'Returns true if the column is hidden'); |
22 |
is( $settings->is_hidden('opac', 'biblio-detail', 'holdingst', 'item_callnumber'), 0, 'Returns false if the column is not hidden'); |
23 |
}; |
24 |
|
25 |
1; |