|
Lines 39-44
use Koha::Libraries;
Link Here
|
| 39 |
use Koha::Old::Holds; |
39 |
use Koha::Old::Holds; |
| 40 |
use C4::Reserves qw( AddReserve ModReserveAffect ); |
40 |
use C4::Reserves qw( AddReserve ModReserveAffect ); |
| 41 |
use C4::Circulation qw( AddReturn ); |
41 |
use C4::Circulation qw( AddReturn ); |
|
|
42 |
use JSON qw( decode_json ); |
| 42 |
|
43 |
|
| 43 |
my $schema = Koha::Database->new->schema; |
44 |
my $schema = Koha::Database->new->schema; |
| 44 |
my $builder = t::lib::TestBuilder->new; |
45 |
my $builder = t::lib::TestBuilder->new; |
|
Lines 1745-1751
subtest 'revert_found() tests' => sub {
Link Here
|
| 1745 |
}; |
1746 |
}; |
| 1746 |
}; |
1747 |
}; |
| 1747 |
subtest 'move_hold() tests' => sub { |
1748 |
subtest 'move_hold() tests' => sub { |
| 1748 |
plan tests => 13; |
1749 |
plan tests => 16; |
| 1749 |
$schema->storage->txn_begin; |
1750 |
$schema->storage->txn_begin; |
| 1750 |
|
1751 |
|
| 1751 |
my $patron = Koha::Patron->new( |
1752 |
my $patron = Koha::Patron->new( |
|
Lines 1887-1892
subtest 'move_hold() tests' => sub {
Link Here
|
| 1887 |
|
1888 |
|
| 1888 |
is( $logs_2->count, 1, 'Hold modification was logged' ); |
1889 |
is( $logs_2->count, 1, 'Hold modification was logged' ); |
| 1889 |
|
1890 |
|
|
|
1891 |
my $diff_2 = decode_json( $logs_2->next->diff ); |
| 1892 |
is( |
| 1893 |
$diff_2->{D}->{biblionumber}->{O}, $biblio3->biblionumber, |
| 1894 |
'diff column for Old (O) contains original biblionumber for record level move' |
| 1895 |
); |
| 1896 |
is( |
| 1897 |
$diff_2->{D}->{biblionumber}->{N}, $biblio4->biblionumber, |
| 1898 |
'diff column for New (N) contains new biblionumber for record level move' |
| 1899 |
); |
| 1900 |
is( |
| 1901 |
$diff_2->{D}->{itemnumber}, undef, |
| 1902 |
'diff column contains undef itemnumber because this is a record level move' |
| 1903 |
); |
| 1904 |
|
| 1890 |
#disable HoldsLog |
1905 |
#disable HoldsLog |
| 1891 |
t::lib::Mocks::mock_preference( 'HoldsLog', 0 ); |
1906 |
t::lib::Mocks::mock_preference( 'HoldsLog', 0 ); |
| 1892 |
|
1907 |
|
| 1893 |
- |
|
|