Lines 1-7
Link Here
|
1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
use Test::More tests => 42; |
4 |
use Test::More tests => 43; |
5 |
|
5 |
|
6 |
use C4::Acquisition; |
6 |
use C4::Acquisition; |
7 |
|
7 |
|
Lines 30-35
my $borrower2 = {
Link Here
|
30 |
branchcode => 'B2', |
30 |
branchcode => 'B2', |
31 |
}; |
31 |
}; |
32 |
|
32 |
|
|
|
33 |
my $borrower3 = { |
34 |
borrowernumber => 3, |
35 |
branchcode => 'B3', |
36 |
}; |
37 |
|
33 |
# Baskets |
38 |
# Baskets |
34 |
my $basket1 = { |
39 |
my $basket1 = { |
35 |
basketno => 1, |
40 |
basketno => 1, |
Lines 185-190
ok( CanUserManageBasket($borrower2, $basket2, $flags) );
Link Here
|
185 |
ok( not CanUserManageBasket($borrower2, $basket3, $flags) ); |
190 |
ok( not CanUserManageBasket($borrower2, $basket3, $flags) ); |
186 |
ok( CanUserManageBasket($borrower2, $basket4, $flags) ); |
191 |
ok( CanUserManageBasket($borrower2, $basket4, $flags) ); |
187 |
|
192 |
|
|
|
193 |
# Test for Bug |
194 |
# basket 4 is not managed by borrower3 but by other borrowers |
195 |
ok( not CanUserManageBasket($borrower3, $basket4, $flags) ); |
188 |
|
196 |
|
189 |
# Mocked subs |
197 |
# Mocked subs |
190 |
|
198 |
|
191 |
- |
|
|