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

(-)a/t/db_dependent/Template/Plugin/Branches.t (-2 / +28 lines)
Lines 16-22 Link Here
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
18
19
use Test::More tests => 3;
19
use Test::More tests => 4;
20
use Test::MockModule;
20
use Test::MockModule;
21
21
22
use C4::Context;
22
use C4::Context;
Lines 217-219 subtest 'pickup_locations() tests' => sub { Link Here
217
217
218
    $schema->storage->txn_rollback;
218
    $schema->storage->txn_rollback;
219
};
219
};
220
- 
220
221
subtest 'branch specfic js and css' => sub {
222
223
    plan tests => 2;
224
225
    $schema->storage->txn_begin;
226
227
    my $newbranch = $builder->build({
228
        source => 'Branch',
229
        value => {
230
            branchcode => 'AAA',
231
            branchname => 'Specific Branch',
232
            userjs => 'console.log(\'Hello World\');',
233
            usercss => 'body { background-color: blue; }'
234
        }
235
    });
236
237
    my $plugin = Koha::Template::Plugin::Branches->new();
238
239
    my $userjs = $plugin->GetBranchSpecificJS($newbranch->{branchcode});
240
    is($userjs, $newbranch->{userjs},'received correct JS string from function');
241
242
    my $usercss = $plugin->GetBranchSpecificCSS($newbranch->{branchcode});
243
    is($usercss, $newbranch->{usercss},'received correct CSS string from function');
244
245
    $schema->storage->txn_rollback;
246
};

Return to bug 32721