X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2Fdb_dependent%2Fapi%2Fv1%2Fholds.t;h=1374a7b15946683fd7be20257d74afc0f6d1bb72;hb=6ebcc255d3def898c491333bc8702c56b09e4537;hp=31a14303dc6a6c952c48b4fec384ef661d6170d5;hpb=1db9598e81abf009b80aa44699061e845c9e87e0;p=koha.git diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index 31a14303dc..1374a7b159 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -330,7 +330,7 @@ $schema->storage->txn_rollback; subtest 'suspend and resume tests' => sub { - plan tests => 20; + plan tests => 21; $schema->storage->txn_begin; @@ -359,7 +359,7 @@ subtest 'suspend and resume tests' => sub { ok( $hold->is_suspended, 'Hold is suspended' ); $t->json_is( - '/expiration_date', + '/end_date', output_pref( { dt => dt_from_string( $hold->suspend_until ), dateformat => 'rfc3339', @@ -378,12 +378,13 @@ subtest 'suspend and resume tests' => sub { "//$userid:$password@/api/v1/holds/" . $hold->id . "/suspension" => json => { - expiration_date => + end_date => output_pref( { dt => $date, dateformat => 'rfc3339', dateonly => 1 } ) } )->status_is( 201, 'Hold suspension created' ) - ->json_is( '/expiration_date', - output_pref( { dt => $date, dateformat => 'rfc3339', dateonly => 1 } ) ); + ->json_is( '/end_date', + output_pref( { dt => $date, dateformat => 'rfc3339', dateonly => 1 } ) ) + ->header_is( Location => "/api/v1/holds/" . $hold->id . "/suspension", 'The Location header is set' ); $t->delete_ok( "//$userid:$password@/api/v1/holds/" . $hold->id . "/suspension" ) ->status_is( 204, "Correct status when deleting a resource" )