Revert "Bug 24232: Regression tests"

This reverts commit 7be05a35de.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2020-01-14 20:53:26 +00:00
parent 407c316e77
commit 897d4e22a5
1 changed files with 2 additions and 18 deletions

View File

@ -37,14 +37,14 @@ my $t = Test::Mojo->new('Koha::REST::V1');
subtest 'delete() tests' => sub {
plan tests => 9;
plan tests => 7;
$schema->storage->txn_begin;
my $patron = $builder->build_object(
{
class => 'Koha::Patrons',
value => { flags => 0 } # no permissions
value => { flags => 9 }
}
);
my $password = 'thePassword123';
@ -54,22 +54,6 @@ subtest 'delete() tests' => sub {
my $item = $builder->build_sample_item();
my $biblio_id = $item->biblionumber;
$t->delete_ok("//$userid:$password@/api/v1/biblios/$biblio_id")
->status_is(403, 'Not enough permissions makes it return the right code');
# Add permissions
$builder->build(
{
source => 'UserPermission',
value => {
borrowernumber => $patron->borrowernumber,
module_bit => 9,
code => 'edit_catalogue'
}
}
);
# Bibs with items cannot be deleted
$t->delete_ok("//$userid:$password@/api/v1/biblios/$biblio_id")
->status_is(409);