diff --git a/t/db_dependent/Koha/REST/Plugin/Objects.t b/t/db_dependent/Koha/REST/Plugin/Objects.t index 2f4937f89d..e85a57f78d 100755 --- a/t/db_dependent/Koha/REST/Plugin/Objects.t +++ b/t/db_dependent/Koha/REST/Plugin/Objects.t @@ -470,7 +470,7 @@ subtest 'object.search helper order by embedded columns' => sub { subtest 'objects.find helper' => sub { - plan tests => 6; + plan tests => 9; my $t = Test::Mojo->new; @@ -487,6 +487,13 @@ subtest 'objects.find helper' => sub { ->status_is(200) ->json_is( $city_2->to_api ); + # Remove the city + my $city_2_id = $city_2->id; + $city_2->delete; + $t->get_ok( '/cities/' . $city_2_id ) + ->status_is(200) + ->json_is( undef ); + $schema->storage->txn_rollback; };