Lines 175-181
subtest 'update_notes() tests' => sub {
Link Here
|
175 |
|
175 |
|
176 |
subtest 'resolve_claim() tests' => sub { |
176 |
subtest 'resolve_claim() tests' => sub { |
177 |
|
177 |
|
178 |
plan tests => 8; |
178 |
plan tests => 9; |
179 |
|
179 |
|
180 |
$schema->storage->txn_begin; |
180 |
$schema->storage->txn_begin; |
181 |
|
181 |
|
Lines 204-210
subtest 'resolve_claim() tests' => sub {
Link Here
|
204 |
|
204 |
|
205 |
my $claim_id = $claim->id; |
205 |
my $claim_id = $claim->id; |
206 |
|
206 |
|
207 |
$claim->created_by(undef)->store; # resolve the claim must work even if the created_by patron has been removed |
207 |
$claim->set( |
|
|
208 |
{ |
209 |
created_by => undef, |
210 |
updated_by => undef, |
211 |
} |
212 |
)->store; # resolve the claim must work even if the created_by patron has been removed |
208 |
|
213 |
|
209 |
# Resolve a claim |
214 |
# Resolve a claim |
210 |
$t->put_ok( |
215 |
$t->put_ok( |
Lines 217-222
subtest 'resolve_claim() tests' => sub {
Link Here
|
217 |
$claim->discard_changes; |
222 |
$claim->discard_changes; |
218 |
is( $claim->resolution, "FOUNDINLIB" ); |
223 |
is( $claim->resolution, "FOUNDINLIB" ); |
219 |
is( $claim->resolved_by, $librarian->id ); |
224 |
is( $claim->resolved_by, $librarian->id ); |
|
|
225 |
is( $claim->updated_by, $librarian->id ); |
220 |
ok( $claim->resolved_on ); |
226 |
ok( $claim->resolved_on ); |
221 |
|
227 |
|
222 |
# Make sure the claim doesn't exist on the DB anymore |
228 |
# Make sure the claim doesn't exist on the DB anymore |
223 |
- |
|
|