Lines 471-480
subtest 'suspend and resume tests' => sub {
Link Here
|
471 |
->status_is( 400, 'Cannot suspend waiting hold' ) |
471 |
->status_is( 400, 'Cannot suspend waiting hold' ) |
472 |
->json_is( '/error', 'Found hold cannot be suspended. Status=W' ); |
472 |
->json_is( '/error', 'Found hold cannot be suspended. Status=W' ); |
473 |
|
473 |
|
474 |
$hold->set_waiting(1)->discard_changes; |
474 |
$hold->set_transfer->discard_changes; |
475 |
|
475 |
|
476 |
$t->post_ok( "//$userid:$password@/api/v1/holds/" . $hold->id . "/suspension" ) |
476 |
$t->post_ok( "//$userid:$password@/api/v1/holds/" . $hold->id . "/suspension" ) |
477 |
->status_is( 400, 'Cannot suspend waiting hold' ) |
477 |
->status_is( 400, 'Cannot suspend hold on transfer' ) |
478 |
->json_is( '/error', 'Found hold cannot be suspended. Status=T' ); |
478 |
->json_is( '/error', 'Found hold cannot be suspended. Status=T' ); |
479 |
|
479 |
|
480 |
$schema->storage->txn_rollback; |
480 |
$schema->storage->txn_rollback; |
481 |
- |
|
|