Lines 126-132
subtest 'Basic object tests' => sub {
Link Here
|
126 |
}; |
126 |
}; |
127 |
|
127 |
|
128 |
subtest 'store borrowernumber change also updates holds' => sub { |
128 |
subtest 'store borrowernumber change also updates holds' => sub { |
129 |
plan tests => 3; |
129 |
plan tests => 5; |
130 |
|
130 |
|
131 |
$schema->storage->txn_begin; |
131 |
$schema->storage->txn_begin; |
132 |
|
132 |
|
Lines 170-175
subtest 'store borrowernumber change also updates holds' => sub {
Link Here
|
170 |
is( $request->borrowernumber, $other_patron->borrowernumber, |
170 |
is( $request->borrowernumber, $other_patron->borrowernumber, |
171 |
'after change, changed borrowernumber found in illrequests' ); |
171 |
'after change, changed borrowernumber found in illrequests' ); |
172 |
|
172 |
|
|
|
173 |
my $new_request = Koha::Illrequest->new({ |
174 |
biblio_id => $biblio->biblionumber, |
175 |
branchcode => $patron->branchcode, |
176 |
})->borrowernumber( $patron->borrowernumber )->store; |
177 |
|
178 |
is( $new_request->borrowernumber, $patron->borrowernumber, |
179 |
'Koha::Illrequest->new()->store() works as expected'); |
180 |
|
181 |
my $new_holds_found = Koha::Holds->search({ |
182 |
biblionumber => $new_request->biblio_id, |
183 |
borrowernumber => $new_request->borrowernumber, |
184 |
})->count; |
185 |
|
186 |
is( $new_holds_found, 0, 'no holds found with new()->store()' ); |
187 |
|
173 |
$schema->storage->txn_rollback; |
188 |
$schema->storage->txn_rollback; |
174 |
|
189 |
|
175 |
}; |
190 |
}; |
176 |
- |
|
|