Browse Source

Bug 18756 - add Unit Test

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17.11.x
Fridolin Somers 4 years ago
committed by Jonathan Druart
parent
commit
8b15c06440
  1. 9
      t/Acquisition/CanUserManageBasket.t

9
t/Acquisition/CanUserManageBasket.t

@ -1,7 +1,7 @@
#!/usr/bin/perl
use Modern::Perl;
use Test::More tests => 42;
use Test::More tests => 43;
use C4::Acquisition;
@ -30,6 +30,11 @@ my $borrower2 = {
branchcode => 'B2',
};
my $borrower3 = {
borrowernumber => 3,
branchcode => 'B3',
};
# Baskets
my $basket1 = {
basketno => 1,
@ -185,6 +190,8 @@ ok( CanUserManageBasket($borrower2, $basket2, $flags) );
ok( not CanUserManageBasket($borrower2, $basket3, $flags) );
ok( CanUserManageBasket($borrower2, $basket4, $flags) );
# basket 4 is not managed by borrower3 but by other borrowers
ok( not CanUserManageBasket($borrower3, $basket4, $flags) );
# Mocked subs

Loading…
Cancel
Save