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