View | Details | Raw Unified | Return to bug 35581
Collapse All | Expand All

(-)a/Koha/Illbatch.pm (-6 / +6 lines)
Lines 1-4 Link Here
1
package Koha::Illbatch;
1
package Koha::ILL::Batch;
2
2
3
# Copyright PTFS Europe 2022
3
# Copyright PTFS Europe 2022
4
#
4
#
Lines 32-44 use base qw(Koha::Object); Link Here
32
32
33
=head1 NAME
33
=head1 NAME
34
34
35
Koha::Illbatch - Koha Illbatch Object class
35
Koha::ILL::Batch - Koha Illbatch Object class
36
36
37
=head2 Class methods
37
=head2 Class methods
38
38
39
=head3 status
39
=head3 status
40
40
41
    my $status = Koha::Illbatch->status;
41
    my $status = Koha::ILL::Batch > status;
42
42
43
Return the status object associated with this batch
43
Return the status object associated with this batch
44
44
Lines 51-57 sub status { Link Here
51
51
52
=head3 patron
52
=head3 patron
53
53
54
    my $patron = Koha::Illbatch->patron;
54
    my $patron = Koha::ILL::Batch->patron;
55
55
56
Return the I<Koha::Patron> object associated with this batch
56
Return the I<Koha::Patron> object associated with this batch
57
57
Lines 66-72 sub patron { Link Here
66
66
67
=head3 library
67
=head3 library
68
68
69
    my $library = Koha::Illbatch->library;
69
    my $library = Koha::ILL::Batch->library;
70
70
71
Return the I<Koha::Library> object associated with this batch
71
Return the I<Koha::Library> object associated with this batch
72
72
Lines 232-238 sub strings_map { Link Here
232
232
233
=head3 _type
233
=head3 _type
234
234
235
    my $type = Koha::Illbatch->_type;
235
    my $type = Koha::ILL::Batch->_type;
236
236
237
Return this object's type
237
Return this object's type
238
238
(-)a/Koha/Illbatches.pm (-6 / +6 lines)
Lines 1-4 Link Here
1
package Koha::Illbatches;
1
package Koha::ILL::Batches;
2
2
3
# Copyright PTFS Europe 2022
3
# Copyright PTFS Europe 2022
4
#
4
#
Lines 19-36 package Koha::Illbatches; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Koha::Database;
21
use Koha::Database;
22
use Koha::Illbatch;
22
use Koha::ILL::Batch;
23
use base qw(Koha::Objects);
23
use base qw(Koha::Objects);
24
24
25
=head1 NAME
25
=head1 NAME
26
26
27
Koha::Illbatches - Koha Illbatches Object class
27
Koha::ILL::Batches - Koha Illbatches Object class
28
28
29
=head2 Internal methods
29
=head2 Internal methods
30
30
31
=head3 _type
31
=head3 _type
32
32
33
    my $type = Koha::Illbatches->_type;
33
    my $type = Koha::ILL::Batches->_type;
34
34
35
Return this object's type
35
Return this object's type
36
36
Lines 42-55 sub _type { Link Here
42
42
43
=head3 object_class
43
=head3 object_class
44
44
45
    my $class = Koha::Illbatches->object_class;
45
    my $class = Koha::ILL::Batches->object_class;
46
46
47
Return this object's class name
47
Return this object's class name
48
48
49
=cut
49
=cut
50
50
51
sub object_class {
51
sub object_class {
52
    return 'Koha::Illbatch';
52
    return 'Koha::ILL::Batch';
53
}
53
}
54
54
55
=head1 AUTHOR
55
=head1 AUTHOR
(-)a/Koha/IllbatchStatus.pm (-2 / +2 lines)
Lines 20-26 package Koha::IllbatchStatus; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use Koha::Database;
21
use Koha::Database;
22
use Koha::Illrequest::Logger;
22
use Koha::Illrequest::Logger;
23
use Koha::Illbatch;
23
use Koha::ILL::Batch;
24
use JSON qw( to_json );
24
use JSON qw( to_json );
25
use base qw(Koha::Object);
25
use base qw(Koha::Object);
26
26
Lines 124-130 sub delete_and_log { Link Here
124
    }
124
    }
125
125
126
    # Update all batches that use this status to have status UNKNOWN
126
    # Update all batches that use this status to have status UNKNOWN
127
    my $affected = Koha::Illbatches->search( { status_code => $self->code } );
127
    my $affected = Koha::ILL::Batches->search( { status_code => $self->code } );
128
    $affected->update( { status_code => 'UNKNOWN' } );
128
    $affected->update( { status_code => 'UNKNOWN' } );
129
129
130
    my $logger = Koha::Illrequest::Logger->new;
130
    my $logger = Koha::Illrequest::Logger->new;
(-)a/Koha/Illrequest.pm (-3 / +3 lines)
Lines 35-41 use Koha::Illrequestattributes; Link Here
35
use Koha::AuthorisedValue;
35
use Koha::AuthorisedValue;
36
use Koha::Illrequest::Logger;
36
use Koha::Illrequest::Logger;
37
use Koha::Patron;
37
use Koha::Patron;
38
use Koha::Illbatches;
38
use Koha::ILL::Batches;
39
use Koha::AuthorisedValues;
39
use Koha::AuthorisedValues;
40
use Koha::Biblios;
40
use Koha::Biblios;
41
use Koha::Items;
41
use Koha::Items;
Lines 151-157 sub push_processor { Link Here
151
151
152
    my $ill_batch = $request->ill_batch;
152
    my $ill_batch = $request->ill_batch;
153
153
154
Returns the I<Koha::Illbatch> associated with the request
154
Returns the I<Koha::ILL::Batch> associated with the request
155
155
156
=cut
156
=cut
157
157
Lines 160-166 sub ill_batch { Link Here
160
160
161
    my $ill_batch = $self->_result->ill_batch;
161
    my $ill_batch = $self->_result->ill_batch;
162
    return unless $ill_batch;
162
    return unless $ill_batch;
163
    return Koha::Illbatch->_new_from_dbic($ill_batch);
163
    return Koha::ILL::Batch->_new_from_dbic($ill_batch);
164
}
164
}
165
165
166
=head3 statusalias
166
=head3 statusalias
(-)a/Koha/REST/V1/Illbatches.pm (-9 / +9 lines)
Lines 1-4 Link Here
1
package Koha::REST::V1::Illbatches;
1
package Koha::REST::V1::ILL::Batches;
2
2
3
# This file is part of Koha.
3
# This file is part of Koha.
4
#
4
#
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Koha::Illbatches;
22
use Koha::ILL::Batches;
23
use Koha::IllbatchStatuses;
23
use Koha::IllbatchStatuses;
24
use Koha::Illrequests;
24
use Koha::Illrequests;
25
25
Lines 27-33 use Try::Tiny qw( catch try ); Link Here
27
27
28
=head1 NAME
28
=head1 NAME
29
29
30
Koha::REST::V1::Illbatches
30
Koha::REST::V1::ILL::Batches
31
31
32
=head2 Operations
32
=head2 Operations
33
33
Lines 43-49 sub list { Link Here
43
    return try {
43
    return try {
44
        return $c->render(
44
        return $c->render(
45
            status  => 200,
45
            status  => 200,
46
            openapi => $c->objects->search( Koha::Illbatches->new )
46
            openapi => $c->objects->search( Koha::ILL::Batches->new )
47
        );
47
        );
48
    } catch {
48
    } catch {
49
        warn "$_";
49
        warn "$_";
Lines 61-67 sub get { Link Here
61
    my $c = shift->openapi->valid_input or return;
61
    my $c = shift->openapi->valid_input or return;
62
62
63
    return try {
63
    return try {
64
        my $ill_batch = $c->objects->find( Koha::Illbatches->new, $c->param('ill_batch_id') );
64
        my $ill_batch = $c->objects->find( Koha::ILL::Batches->new, $c->param('ill_batch_id') );
65
65
66
        unless ($ill_batch) {
66
        unless ($ill_batch) {
67
            return $c->render(
67
            return $c->render(
Lines 103-114 sub add { Link Here
103
    $body->{patron_id} = $patron->id;
103
    $body->{patron_id} = $patron->id;
104
104
105
    return try {
105
    return try {
106
        my $batch = Koha::Illbatch->new_from_api($body);
106
        my $batch = Koha::ILL::Batch->new_from_api($body);
107
        $batch->create_and_log;
107
        $batch->create_and_log;
108
108
109
        $c->res->headers->location( $c->req->url->to_string . '/' . $batch->id );
109
        $c->res->headers->location( $c->req->url->to_string . '/' . $batch->id );
110
110
111
        my $ill_batch = $c->objects->find( Koha::Illbatches->new, $batch->id );
111
        my $ill_batch = $c->objects->find( Koha::ILL::Batches->new, $batch->id );
112
112
113
        return $c->render(
113
        return $c->render(
114
            status  => 201,
114
            status  => 201,
Lines 136-142 Update a batch Link Here
136
sub update {
136
sub update {
137
    my $c = shift->openapi->valid_input or return;
137
    my $c = shift->openapi->valid_input or return;
138
138
139
    my $batch = Koha::Illbatches->find( $c->param('ill_batch_id') );
139
    my $batch = Koha::ILL::Batches->find( $c->param('ill_batch_id') );
140
140
141
    unless ($batch) {
141
    unless ($batch) {
142
        return $c->render(
142
        return $c->render(
Lines 170-176 sub delete { Link Here
170
170
171
    my $c = shift->openapi->valid_input or return;
171
    my $c = shift->openapi->valid_input or return;
172
172
173
    my $batch = Koha::Illbatches->find( $c->param('ill_batch_id') );
173
    my $batch = Koha::ILL::Batches->find( $c->param('ill_batch_id') );
174
174
175
    if ( not defined $batch ) {
175
    if ( not defined $batch ) {
176
        return $c->render( status => 404, openapi => { error => "ILL batch not found" } );
176
        return $c->render( status => 404, openapi => { error => "ILL batch not found" } );
(-)a/Koha/Schema/Result/Illbatch.pm (-2 / +2 lines)
Lines 205-215 __PACKAGE__->has_many( Link Here
205
);
205
);
206
206
207
sub koha_object_class {
207
sub koha_object_class {
208
    'Koha::Illbatch';
208
    'Koha::ILL::Batch';
209
}
209
}
210
210
211
sub koha_objects_class {
211
sub koha_objects_class {
212
    'Koha::Illbatches';
212
    'Koha::ILL::Batches';
213
}
213
}
214
214
215
1;
215
1;
(-)a/api/v1/swagger/paths/ill_batches.yaml (-5 / +5 lines)
Lines 1-7 Link Here
1
---
1
---
2
/ill/batches:
2
/ill/batches:
3
  get:
3
  get:
4
    x-mojo-to: Illbatches#list
4
    x-mojo-to: ILL::Batches#list
5
    operationId: listIllbatches
5
    operationId: listIllbatches
6
    tags:
6
    tags:
7
      - ill_batches
7
      - ill_batches
Lines 62-68 Link Here
62
      permissions:
62
      permissions:
63
        ill: "1"
63
        ill: "1"
64
  post:
64
  post:
65
    x-mojo-to: Illbatches#add
65
    x-mojo-to: ILL::Batches#add
66
    operationId: addIllbatch
66
    operationId: addIllbatch
67
    tags:
67
    tags:
68
      - ill_batches
68
      - ill_batches
Lines 131-137 Link Here
131
        ill: "1"
131
        ill: "1"
132
"/ill/batches/{ill_batch_id}":
132
"/ill/batches/{ill_batch_id}":
133
  get:
133
  get:
134
    x-mojo-to: Illbatches#get
134
    x-mojo-to: ILL::Batches#get
135
    operationId: getIllbatches
135
    operationId: getIllbatches
136
    tags:
136
    tags:
137
      - ill_batches
137
      - ill_batches
Lines 197-203 Link Here
197
      permissions:
197
      permissions:
198
        ill: "1"
198
        ill: "1"
199
  put:
199
  put:
200
    x-mojo-to: Illbatches#update
200
    x-mojo-to: ILL::Batches#update
201
    operationId: updateIllBatch
201
    operationId: updateIllBatch
202
    tags:
202
    tags:
203
      - ill_batches
203
      - ill_batches
Lines 250-256 Link Here
250
      permissions:
250
      permissions:
251
        ill: "1"
251
        ill: "1"
252
  delete:
252
  delete:
253
    x-mojo-to: Illbatches#delete
253
    x-mojo-to: ILL::Batches#delete
254
    operationId: deleteBatch
254
    operationId: deleteBatch
255
    tags:
255
    tags:
256
      - ill_batches
256
      - ill_batches
(-)a/ill/ill-requests.pl (-3 / +3 lines)
Lines 28-34 use Koha::AuthorisedValues; Link Here
28
use Koha::Illcomment;
28
use Koha::Illcomment;
29
use Koha::Illrequests;
29
use Koha::Illrequests;
30
use Koha::Illrequest;
30
use Koha::Illrequest;
31
use Koha::Illbatches;
31
use Koha::ILL::Batches;
32
use Koha::Illrequest::Workflow::Availability;
32
use Koha::Illrequest::Workflow::Availability;
33
use Koha::Illrequest::Workflow::TypeDisclaimer;
33
use Koha::Illrequest::Workflow::TypeDisclaimer;
34
use Koha::Libraries;
34
use Koha::Libraries;
Lines 221-227 if ( $backends_available ) { Link Here
221
        # We simulate the API for backend requests for uniformity.
221
        # We simulate the API for backend requests for uniformity.
222
        # So, init:
222
        # So, init:
223
        my $request = Koha::Illrequests->find($params->{illrequest_id});
223
        my $request = Koha::Illrequests->find($params->{illrequest_id});
224
        my $batches = Koha::Illbatches->search(undef, {
224
        my $batches = Koha::ILL::Batches->search(undef, {
225
            order_by => { -asc => 'name' }
225
            order_by => { -asc => 'name' }
226
        });
226
        });
227
        if ( !$params->{stage} ) {
227
        if ( !$params->{stage} ) {
Lines 400-406 if ( $backends_available ) { Link Here
400
        if ($active_filters->{batch_id}) {
400
        if ($active_filters->{batch_id}) {
401
            my $batch_id = $active_filters->{batch_id};
401
            my $batch_id = $active_filters->{batch_id};
402
            if ($batch_id) {
402
            if ($batch_id) {
403
                my $batch = Koha::Illbatches->find($batch_id);
403
                my $batch = Koha::ILL::Batches->find($batch_id);
404
                $template->param(
404
                $template->param(
405
                    batch => $batch
405
                    batch => $batch
406
                );
406
                );
(-)a/t/db_dependent/IllbatchStatuses.t (-2 / +2 lines)
Lines 191-197 my $status5 = Koha::IllbatchStatus->new( Link Here
191
    }
191
    }
192
);
192
);
193
$status5->create_and_log;
193
$status5->create_and_log;
194
my $batch = Koha::Illbatch->new(
194
my $batch = Koha::ILL::Batch->new(
195
    {
195
    {
196
        name       => "My test batch",
196
        name       => "My test batch",
197
        patron_id  => $patron->borrowernumber,
197
        patron_id  => $patron->borrowernumber,
Lines 205-211 $batch->create_and_log; Link Here
205
# Delete the batch status and ensure the batch's status has been changed
205
# Delete the batch status and ensure the batch's status has been changed
206
# to UNKNOWN
206
# to UNKNOWN
207
$status5->delete_and_log;
207
$status5->delete_and_log;
208
my $updated_code = Koha::Illbatches->find( { status_code => "UNKNOWN" } );
208
my $updated_code = Koha::ILL::Batches->find( { status_code => "UNKNOWN" } );
209
is( $updated_code->status_code, "UNKNOWN", "batches attached to deleted status have status changed to UNKNOWN" );
209
is( $updated_code->status_code, "UNKNOWN", "batches attached to deleted status have status changed to UNKNOWN" );
210
210
211
$schema->storage->txn_rollback;
211
$schema->storage->txn_rollback;
(-)a/t/db_dependent/Koha/Illbatch.t (-2 / +2 lines)
Lines 34-40 subtest 'ill_batch() tests' => sub { Link Here
34
34
35
    $schema->storage->txn_begin;
35
    $schema->storage->txn_begin;
36
36
37
    my $batch   = $builder->build_object( { class => 'Koha::Illbatches' } );
37
    my $batch   = $builder->build_object( { class => 'Koha::ILL::Batches' } );
38
    my $request = $builder->build_object( { class => 'Koha::Illrequests', value => { batch_id => undef } } );
38
    my $request = $builder->build_object( { class => 'Koha::Illrequests', value => { batch_id => undef } } );
39
39
40
    is( $request->ill_batch, undef, 'Not having a linked batch makes the method return undef' );
40
    is( $request->ill_batch, undef, 'Not having a linked batch makes the method return undef' );
Lines 42-48 subtest 'ill_batch() tests' => sub { Link Here
42
    $request->batch_id( $batch->id )->store;
42
    $request->batch_id( $batch->id )->store;
43
43
44
    my $linked_batch = $request->ill_batch;
44
    my $linked_batch = $request->ill_batch;
45
    is( ref($linked_batch), 'Koha::Illbatch' );
45
    is( ref($linked_batch), 'Koha::ILL::Batch' );
46
    is( $linked_batch->id, $batch->id, 'Correct batch linked' );
46
    is( $linked_batch->id, $batch->id, 'Correct batch linked' );
47
47
48
    $schema->storage->txn_rollback;
48
    $schema->storage->txn_rollback;
(-)a/t/db_dependent/Illbatches.t (-5 / +5 lines)
Lines 18-25 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Koha::Database;
20
use Koha::Database;
21
use Koha::Illbatch;
21
use Koha::ILL::Batch;
22
use Koha::Illbatches;
22
use Koha::ILL::Batches;
23
use Koha::Illrequests;
23
use Koha::Illrequests;
24
use Koha::Patrons;
24
use Koha::Patrons;
25
use t::lib::Mocks;
25
use t::lib::Mocks;
Lines 31-38 use Test::More tests => 6; Link Here
31
31
32
my $schema  = Koha::Database->new->schema;
32
my $schema  = Koha::Database->new->schema;
33
my $builder = t::lib::TestBuilder->new;
33
my $builder = t::lib::TestBuilder->new;
34
use_ok('Koha::Illbatch');
34
use_ok('Koha::ILL::Batch');
35
use_ok('Koha::Illbatches');
35
use_ok('Koha::ILL::Batches');
36
36
37
$schema->storage->txn_begin;
37
$schema->storage->txn_begin;
38
38
Lines 53-59 my $branch = $builder->build( { source => 'Branch' } ); Link Here
53
# Create a batch
53
# Create a batch
54
my $illbatch = $builder->build_object(
54
my $illbatch = $builder->build_object(
55
    {
55
    {
56
        class => 'Koha::Illbatches',
56
        class => 'Koha::ILL::Batches',
57
        value  => {
57
        value  => {
58
            name       => "My test batch",
58
            name       => "My test batch",
59
            backend    => "Mock",
59
            backend    => "Mock",
(-)a/t/db_dependent/api/v1/ill_batches.t (-11 / +10 lines)
Lines 25-32 use t::lib::Mocks; Link Here
25
25
26
use JSON qw(encode_json);
26
use JSON qw(encode_json);
27
27
28
use Koha::Illbatch;
28
use Koha::ILL::Batch;
29
use Koha::Illbatches;
29
use Koha::ILL::Batches;
30
use Koha::Illrequests;
30
use Koha::Illrequests;
31
use Koha::IllbatchStatuses;
31
use Koha::IllbatchStatuses;
32
use Koha::Database;
32
use Koha::Database;
Lines 58-64 subtest 'list() tests' => sub { Link Here
58
    $librarian->set_password( { password => $password, skip_validation => 1 } );
58
    $librarian->set_password( { password => $password, skip_validation => 1 } );
59
    my $userid = $librarian->userid;
59
    my $userid = $librarian->userid;
60
60
61
    my $batch_to_delete  = $builder->build_object( { class => 'Koha::Illbatches' } );
61
    my $batch_to_delete  = $builder->build_object( { class => 'Koha::ILL::Batches' } );
62
    my $deleted_batch_id = $batch_to_delete->id;
62
    my $deleted_batch_id = $batch_to_delete->id;
63
    $batch_to_delete->delete;
63
    $batch_to_delete->delete;
64
64
Lines 70-76 subtest 'list() tests' => sub { Link Here
70
70
71
    my $batch_1 = $builder->build_object(
71
    my $batch_1 = $builder->build_object(
72
        {
72
        {
73
            class => 'Koha::Illbatches',
73
            class => 'Koha::ILL::Batches',
74
            value => {
74
            value => {
75
                backend    => "Mock",
75
                backend    => "Mock",
76
                patron_id  => $librarian->id,
76
                patron_id  => $librarian->id,
Lines 100-106 subtest 'list() tests' => sub { Link Here
100
        ->json_has( '/0/library',      'branch embedded' )->json_has( '/0/requests_count', 'request count' );
100
        ->json_has( '/0/library',      'branch embedded' )->json_has( '/0/requests_count', 'request count' );
101
101
102
    # Create a second batch with a different name
102
    # Create a second batch with a different name
103
    my $batch_2 = $builder->build_object( { class => 'Koha::Illbatches' } );
103
    my $batch_2 = $builder->build_object( { class => 'Koha::ILL::Batches' } );
104
104
105
    $query = { ill_batch_id => [ $batch_1->id, $batch_2->id ] };
105
    $query = { ill_batch_id => [ $batch_1->id, $batch_2->id ] };
106
106
Lines 155-161 subtest 'get() tests' => sub { Link Here
155
155
156
    my $batch = $builder->build_object(
156
    my $batch = $builder->build_object(
157
        {
157
        {
158
            class => 'Koha::Illbatches',
158
            class => 'Koha::ILL::Batches',
159
            value => {
159
            value => {
160
                backend    => "Mock",
160
                backend    => "Mock",
161
                patron_id  => $librarian->id,
161
                patron_id  => $librarian->id,
Lines 176-182 subtest 'get() tests' => sub { Link Here
176
176
177
    $t->get_ok( "//$unauth_userid:$password@/api/v1/ill/batches/" . $batch->id )->status_is(403);
177
    $t->get_ok( "//$unauth_userid:$password@/api/v1/ill/batches/" . $batch->id )->status_is(403);
178
178
179
    my $batch_to_delete = $builder->build_object( { class => 'Koha::Illbatches' } );
179
    my $batch_to_delete = $builder->build_object( { class => 'Koha::ILL::Batches' } );
180
    my $non_existent_id = $batch_to_delete->id;
180
    my $non_existent_id = $batch_to_delete->id;
181
    $batch_to_delete->delete;
181
    $batch_to_delete->delete;
182
182
Lines 288-294 subtest 'update() tests' => sub { Link Here
288
    my $unauth_userid = $patron->userid;
288
    my $unauth_userid = $patron->userid;
289
289
290
    my $library  = $builder->build_object( { class => 'Koha::Libraries' } );
290
    my $library  = $builder->build_object( { class => 'Koha::Libraries' } );
291
    my $batch_id = $builder->build_object( { class => 'Koha::Illbatches' } )->id;
291
    my $batch_id = $builder->build_object( { class => 'Koha::ILL::Batches' } )->id;
292
292
293
    # Unauthorized attempt to update
293
    # Unauthorized attempt to update
294
    $t->put_ok( "//$unauth_userid:$password@/api/v1/ill/batches/$batch_id" => json =>
294
    $t->put_ok( "//$unauth_userid:$password@/api/v1/ill/batches/$batch_id" => json =>
Lines 336-342 subtest 'update() tests' => sub { Link Here
336
        ]
336
        ]
337
        );
337
        );
338
338
339
    my $batch_to_delete = $builder->build_object( { class => 'Koha::Illbatches' } );
339
    my $batch_to_delete = $builder->build_object( { class => 'Koha::ILL::Batches' } );
340
    my $non_existent_id = $batch_to_delete->id;
340
    my $non_existent_id = $batch_to_delete->id;
341
    $batch_to_delete->delete;
341
    $batch_to_delete->delete;
342
342
Lines 378-384 subtest 'delete() tests' => sub { Link Here
378
    $patron->set_password( { password => $password, skip_validation => 1 } );
378
    $patron->set_password( { password => $password, skip_validation => 1 } );
379
    my $unauth_userid = $patron->userid;
379
    my $unauth_userid = $patron->userid;
380
380
381
    my $batch_id = $builder->build_object( { class => 'Koha::Illbatches' } )->id;
381
    my $batch_id = $builder->build_object( { class => 'Koha::ILL::Batches' } )->id;
382
382
383
    # Unauthorized attempt to delete
383
    # Unauthorized attempt to delete
384
    $t->delete_ok("//$unauth_userid:$password@/api/v1/ill/batches/$batch_id")->status_is(403);
384
    $t->delete_ok("//$unauth_userid:$password@/api/v1/ill/batches/$batch_id")->status_is(403);
385
- 

Return to bug 35581