Lines 46-56
use t::lib::Dates;
Link Here
|
46 |
my $schema = Koha::Database->new->schema; |
46 |
my $schema = Koha::Database->new->schema; |
47 |
my $builder = t::lib::TestBuilder->new; |
47 |
my $builder = t::lib::TestBuilder->new; |
48 |
|
48 |
|
49 |
subtest 'store PreventWithDrawingItemsStatus' => sub { |
49 |
subtest 'store PreventWithdrawingItemsStatus' => sub { |
50 |
plan tests => 2; |
50 |
plan tests => 2; |
51 |
$schema->storage->txn_begin; |
51 |
$schema->storage->txn_begin; |
52 |
|
52 |
|
53 |
t::lib::Mocks::mock_preference( 'PreventWithDrawingItemsStatus', 'intransit,checkedout' ); |
53 |
t::lib::Mocks::mock_preference( 'PreventWithdrawingItemsStatus', 'intransit,checkedout' ); |
54 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
54 |
my $library_1 = $builder->build( { source => 'Branch' } ); |
55 |
my $library_2 = $builder->build( { source => 'Branch' } ); |
55 |
my $library_2 = $builder->build( { source => 'Branch' } ); |
56 |
|
56 |
|
Lines 93-99
subtest 'store PreventWithDrawingItemsStatus' => sub {
Link Here
|
93 |
'Koha::Exceptions::Item::Transfer::InTransit', |
93 |
'Koha::Exceptions::Item::Transfer::InTransit', |
94 |
'Exception thrown when trying to withdraw item in transit'; |
94 |
'Exception thrown when trying to withdraw item in transit'; |
95 |
|
95 |
|
96 |
t::lib::Mocks::mock_preference( 'PreventWithDrawingItemsStatus', '' ); |
96 |
t::lib::Mocks::mock_preference( 'PreventWithdrawingItemsStatus', '' ); |
97 |
|
97 |
|
98 |
$schema->storage->txn_rollback; |
98 |
$schema->storage->txn_rollback; |
99 |
}; |
99 |
}; |
100 |
- |
|
|