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

(-)a/Koha/REST/V1/Illbatches.pm (-3 / +3 lines)
Lines 106-112 Get one batch Link Here
106
sub get {
106
sub get {
107
    my $c = shift->openapi->valid_input;
107
    my $c = shift->openapi->valid_input;
108
108
109
    my $batchid = $c->param('illbatch_id');
109
    my $batchid = $c->param('ill_batch_id');
110
110
111
    my $batch = Koha::Illbatches->find($batchid);
111
    my $batch = Koha::Illbatches->find($batchid);
112
112
Lines 204-210 Update a batch Link Here
204
sub update {
204
sub update {
205
    my $c = shift->openapi->valid_input or return;
205
    my $c = shift->openapi->valid_input or return;
206
206
207
    my $batch = Koha::Illbatches->find( $c->param('illbatch_id') );
207
    my $batch = Koha::Illbatches->find( $c->param('ill_batch_id') );
208
208
209
    if ( not defined $batch ) {
209
    if ( not defined $batch ) {
210
        return $c->render(
210
        return $c->render(
Lines 253-259 sub delete { Link Here
253
253
254
    my $c = shift->openapi->valid_input or return;
254
    my $c = shift->openapi->valid_input or return;
255
255
256
    my $batch = Koha::Illbatches->find( $c->param('illbatch_id') );
256
    my $batch = Koha::Illbatches->find( $c->param('ill_batch_id') );
257
257
258
    if ( not defined $batch ) {
258
    if ( not defined $batch ) {
259
        return $c->render( status => 404, openapi => { error => "ILL batch not found" } );
259
        return $c->render( status => 404, openapi => { error => "ILL batch not found" } );
(-)a/api/v1/swagger/definitions/illbatches.yaml (-1 / +1 lines)
Lines 1-5 Link Here
1
---
1
---
2
type: array
2
type: array
3
items:
3
items:
4
  $ref: "illbatch.yaml"
4
  $ref: "ill_batch.yaml"
5
additionalProperties: false
5
additionalProperties: false
(-)a/api/v1/swagger/paths/illbatches.yaml (-16 / +16 lines)
Lines 1-10 Link Here
1
---
1
---
2
/illbatches:
2
/ill/batches:
3
  get:
3
  get:
4
    x-mojo-to: Illbatches#list
4
    x-mojo-to: Illbatches#list
5
    operationId: listIllbatches
5
    operationId: listIllbatches
6
    tags:
6
    tags:
7
      - illbatches
7
      - ill_batches
8
    summary: List ILL batches
8
    summary: List ILL batches
9
    parameters: []
9
    parameters: []
10
    produces:
10
    produces:
Lines 13-19 Link Here
13
      "200":
13
      "200":
14
        description: A list of ILL batches
14
        description: A list of ILL batches
15
        schema:
15
        schema:
16
          $ref: "../swagger.yaml#/definitions/illbatches"
16
          $ref: "../swagger.yaml#/definitions/ill_batches"
17
      "401":
17
      "401":
18
        description: Authentication required
18
        description: Authentication required
19
        schema:
19
        schema:
Lines 44-50 Link Here
44
    x-mojo-to: Illbatches#add
44
    x-mojo-to: Illbatches#add
45
    operationId: addIllbatch
45
    operationId: addIllbatch
46
    tags:
46
    tags:
47
      - illbatches
47
      - ill_batches
48
    summary: Add ILL batch
48
    summary: Add ILL batch
49
    parameters:
49
    parameters:
50
      - name: body
50
      - name: body
Lines 52-65 Link Here
52
        description: A JSON object containing informations about the new batch
52
        description: A JSON object containing informations about the new batch
53
        required: true
53
        required: true
54
        schema:
54
        schema:
55
          $ref: "../swagger.yaml#/definitions/illbatch"
55
          $ref: "../swagger.yaml#/definitions/ill_batch"
56
    produces:
56
    produces:
57
      - application/json
57
      - application/json
58
    responses:
58
    responses:
59
      "201":
59
      "201":
60
        description: Batch added
60
        description: Batch added
61
        schema:
61
        schema:
62
          $ref: "../swagger.yaml#/definitions/illbatch"
62
          $ref: "../swagger.yaml#/definitions/ill_batch"
63
      "400":
63
      "400":
64
        description: Bad request
64
        description: Bad request
65
        schema:
65
        schema:
Lines 94-108 Link Here
94
    x-koha-authorization:
94
    x-koha-authorization:
95
      permissions:
95
      permissions:
96
        ill: "1"
96
        ill: "1"
97
"/illbatches/{illbatch_id}":
97
"/ill/batches/{ill_batch_id}":
98
  get:
98
  get:
99
    x-mojo-to: Illbatches#get
99
    x-mojo-to: Illbatches#get
100
    operationId: getIllbatches
100
    operationId: getIllbatches
101
    tags:
101
    tags:
102
      - illbatches
102
      - ill_batches
103
    summary: Get ILL batch
103
    summary: Get ILL batch
104
    parameters:
104
    parameters:
105
      - name: illbatch_id
105
      - name: ill_batch_id
106
        in: path
106
        in: path
107
        description: ILL batch id/name/contents
107
        description: ILL batch id/name/contents
108
        required: true
108
        required: true
Lines 113-119 Link Here
113
      "200":
113
      "200":
114
        description: An ILL batch
114
        description: An ILL batch
115
        schema:
115
        schema:
116
          $ref: "../swagger.yaml#/definitions/illbatch"
116
          $ref: "../swagger.yaml#/definitions/ill_batch"
117
      "401":
117
      "401":
118
        description: Authentication required
118
        description: Authentication required
119
        schema:
119
        schema:
Lines 144-159 Link Here
144
    x-mojo-to: Illbatches#update
144
    x-mojo-to: Illbatches#update
145
    operationId: updateIllBatch
145
    operationId: updateIllBatch
146
    tags:
146
    tags:
147
      - illbatches
147
      - ill_batches
148
    summary: Update batch
148
    summary: Update batch
149
    parameters:
149
    parameters:
150
      - $ref: "../swagger.yaml#/parameters/illbatch_id_pp"
150
      - $ref: "../swagger.yaml#/parameters/ill_batch_id_pp"
151
      - name: body
151
      - name: body
152
        in: body
152
        in: body
153
        description: A JSON object containing information on the batch
153
        description: A JSON object containing information on the batch
154
        required: true
154
        required: true
155
        schema:
155
        schema:
156
          $ref: "../swagger.yaml#/definitions/illbatch"
156
          $ref: "../swagger.yaml#/definitions/ill_batch"
157
    consumes:
157
    consumes:
158
      - application/json
158
      - application/json
159
    produces:
159
    produces:
Lines 162-168 Link Here
162
      "200":
162
      "200":
163
        description: An ILL batch
163
        description: An ILL batch
164
        schema:
164
        schema:
165
          $ref: "../swagger.yaml#/definitions/illbatch"
165
          $ref: "../swagger.yaml#/definitions/ill_batch"
166
      "400":
166
      "400":
167
        description: Bad request
167
        description: Bad request
168
        schema:
168
        schema:
Lines 197-206 Link Here
197
    x-mojo-to: Illbatches#delete
197
    x-mojo-to: Illbatches#delete
198
    operationId: deleteBatch
198
    operationId: deleteBatch
199
    tags:
199
    tags:
200
      - illbatches
200
      - ill_batches
201
    summary: Delete ILL batch
201
    summary: Delete ILL batch
202
    parameters:
202
    parameters:
203
      - $ref: "../swagger.yaml#/parameters/illbatch_id_pp"
203
      - $ref: "../swagger.yaml#/parameters/ill_batch_id_pp"
204
    produces:
204
    produces:
205
      - application/json
205
      - application/json
206
    responses:
206
    responses:
(-)a/api/v1/swagger/swagger.yaml (-11 / +11 lines)
Lines 64-73 definitions: Link Here
64
    $ref: ./definitions/ill_status.yaml
64
    $ref: ./definitions/ill_status.yaml
65
  ill_request:
65
  ill_request:
66
    $ref: ./definitions/ill_request.yaml
66
    $ref: ./definitions/ill_request.yaml
67
  illbatch:
67
  ill_batch:
68
    $ref: ./definitions/illbatch.yaml
68
    $ref: ./definitions/ill_batch.yaml
69
  illbatches:
69
  ill_batches:
70
    $ref: ./definitions/illbatches.yaml
70
    $ref: ./definitions/ill_batches.yaml
71
  illbatchstatus:
71
  illbatchstatus:
72
    $ref: ./definitions/illbatchstatus.yaml
72
    $ref: ./definitions/illbatchstatus.yaml
73
  illbatchstatuses:
73
  illbatchstatuses:
Lines 277-286 paths: Link Here
277
    $ref: "./paths/ill_backends.yaml#/~1ill~1backends~1{ill_backend_id}"
277
    $ref: "./paths/ill_backends.yaml#/~1ill~1backends~1{ill_backend_id}"
278
  /ill/requests:
278
  /ill/requests:
279
    $ref: ./paths/ill_requests.yaml#/~1ill~1requests
279
    $ref: ./paths/ill_requests.yaml#/~1ill~1requests
280
  /illbatches:
280
  /ill/batches:
281
    $ref: ./paths/illbatches.yaml#/~1illbatches
281
    $ref: ./paths/ill_batches.yaml#/~1ill~1batches
282
  "/illbatches/{illbatch_id}":
282
  "/ill/batches/{ill_batch_id}":
283
    $ref: "./paths/illbatches.yaml#/~1illbatches~1{illbatch_id}"
283
    $ref: "./paths/ill_batches.yaml#/~1ill~1batches~1{ill_batch_id}"
284
  /illbatchstatuses:
284
  /illbatchstatuses:
285
    $ref: ./paths/illbatchstatuses.yaml#/~1illbatchstatuses
285
    $ref: ./paths/illbatchstatuses.yaml#/~1illbatchstatuses
286
  "/illbatchstatuses/{illbatchstatus_code}":
286
  "/illbatchstatuses/{illbatchstatus_code}":
Lines 537-546 parameters: Link Here
537
    name: hold_id
537
    name: hold_id
538
    required: true
538
    required: true
539
    type: integer
539
    type: integer
540
  illbatch_id_pp:
540
  ill_batch_id_pp:
541
    description: Internal ILL batch identifier
541
    description: Internal ILL batch identifier
542
    in: path
542
    in: path
543
    name: illbatch_id
543
    name: ill_batch_id
544
    required: true
544
    required: true
545
    type: integer
545
    type: integer
546
  illbatchstatus_code_pp:
546
  illbatchstatus_code_pp:
Lines 880-886 tags: Link Here
880
    name: ill_backends
880
    name: ill_backends
881
    x-displayName: ILL backends
881
    x-displayName: ILL backends
882
  - description: "Manage ILL module batches\n"
882
  - description: "Manage ILL module batches\n"
883
    name: illbatches
883
    name: ill_batches
884
    x-displayName: ILL batches
884
    x-displayName: ILL batches
885
  - description: "Manage ILL module batch statuses\n"
885
  - description: "Manage ILL module batch statuses\n"
886
    name: illbatchstatuses
886
    name: illbatchstatuses
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-batch.js (-1 / +1 lines)
Lines 13-19 Link Here
13
13
14
    // Make a batch API call, returning the resulting promise
14
    // Make a batch API call, returning the resulting promise
15
    window.doBatchApiRequest = function (url, options) {
15
    window.doBatchApiRequest = function (url, options) {
16
        var batchListApi = '/api/v1/illbatches';
16
        var batchListApi = '/api/v1/ill/batches';
17
        var fullUrl = batchListApi + (url ? url : '');
17
        var fullUrl = batchListApi + (url ? url : '');
18
        return doApiRequest(fullUrl, options);
18
        return doApiRequest(fullUrl, options);
19
    };
19
    };
(-)a/t/db_dependent/api/v1/illbatches.t (-21 / +20 lines)
Lines 60-66 subtest 'list() tests' => sub { Link Here
60
60
61
    ## Authorized user tests
61
    ## Authorized user tests
62
    # No batches, so empty array should be returned
62
    # No batches, so empty array should be returned
63
    $t->get_ok("//$userid:$password@/api/v1/illbatches")->status_is(200)->json_is( [] );
63
    $t->get_ok("//$userid:$password@/api/v1/ill/batches")->status_is(200)->json_is( [] );
64
64
65
    my $batch = $builder->build_object(
65
    my $batch = $builder->build_object(
66
        {
66
        {
Lines 85-91 subtest 'list() tests' => sub { Link Here
85
    );
85
    );
86
86
87
    # One batch created, should get returned
87
    # One batch created, should get returned
88
    $t->get_ok("//$userid:$password@/api/v1/illbatches")->status_is(200)->json_has( '/0/batch_id', 'Batch ID' )
88
    $t->get_ok("//$userid:$password@/api/v1/ill/batches")->status_is(200)->json_has( '/0/batch_id', 'Batch ID' )
89
        ->json_has( '/0/name',           'Batch name' )->json_has( '/0/backend', 'Backend name' )
89
        ->json_has( '/0/name',           'Batch name' )->json_has( '/0/backend', 'Backend name' )
90
        ->json_has( '/0/patron_id',      'Borrowernumber' )->json_has( '/0/library_id', 'Branchcode' )
90
        ->json_has( '/0/patron_id',      'Borrowernumber' )->json_has( '/0/library_id', 'Branchcode' )
91
        ->json_has( '/0/patron',         'patron embedded' )->json_has( '/0/branch', 'branch embedded' )
91
        ->json_has( '/0/patron',         'patron embedded' )->json_has( '/0/branch', 'branch embedded' )
Lines 98-104 subtest 'list() tests' => sub { Link Here
98
    my $batch_with_another_name = $builder->build_object( { class => 'Koha::Illbatches' } );
98
    my $batch_with_another_name = $builder->build_object( { class => 'Koha::Illbatches' } );
99
99
100
    # Two batches created, they should both be returned
100
    # Two batches created, they should both be returned
101
    $t->get_ok("//$userid:$password@/api/v1/illbatches")->status_is(200)->json_has( '/0', 'has first batch' )
101
    $t->get_ok("//$userid:$password@/api/v1/ill/batches")->status_is(200)->json_has( '/0', 'has first batch' )
102
        ->json_has( '/1', 'has second batch' );
102
        ->json_has( '/1', 'has second batch' );
103
103
104
    my $patron = $builder->build_object(
104
    my $patron = $builder->build_object(
Lines 115-121 subtest 'list() tests' => sub { Link Here
115
    my $unauth_userid = $patron->userid;
115
    my $unauth_userid = $patron->userid;
116
116
117
    # Unauthorized access
117
    # Unauthorized access
118
    $t->get_ok("//$unauth_userid:$password@/api/v1/illbatches")->status_is(403);
118
    $t->get_ok("//$unauth_userid:$password@/api/v1/ill/batches")->status_is(403);
119
119
120
    $schema->storage->txn_rollback;
120
    $schema->storage->txn_rollback;
121
};
121
};
Lines 160-178 subtest 'get() tests' => sub { Link Here
160
    $patron->set_password( { password => $password, skip_validation => 1 } );
160
    $patron->set_password( { password => $password, skip_validation => 1 } );
161
    my $unauth_userid = $patron->userid;
161
    my $unauth_userid = $patron->userid;
162
162
163
    $t->get_ok( "//$userid:$password@/api/v1/illbatches/" . $batch->id )->status_is(200)
163
    $t->get_ok( "//$userid:$password@/api/v1/ill/batches/" . $batch->id )->status_is(200)
164
        ->json_has( '/batch_id',   'Batch ID' )->json_has( '/name', 'Batch name' )
164
        ->json_has( '/batch_id',   'Batch ID' )->json_has( '/name', 'Batch name' )
165
        ->json_has( '/backend',    'Backend name' )->json_has( '/patron_id', 'Borrowernumber' )
165
        ->json_has( '/backend',    'Backend name' )->json_has( '/patron_id', 'Borrowernumber' )
166
        ->json_has( '/library_id', 'Branchcode' )->json_has( '/patron', 'patron embedded' )
166
        ->json_has( '/library_id', 'Branchcode' )->json_has( '/patron', 'patron embedded' )
167
        ->json_has( '/branch',     'branch embedded' )->json_has( '/requests_count', 'request count' );
167
        ->json_has( '/branch',     'branch embedded' )->json_has( '/requests_count', 'request count' );
168
168
169
    $t->get_ok( "//$unauth_userid:$password@/api/v1/illbatches/" . $batch->id )->status_is(403);
169
    $t->get_ok( "//$unauth_userid:$password@/api/v1/ill/batches/" . $batch->id )->status_is(403);
170
170
171
    my $batch_to_delete = $builder->build_object( { class => 'Koha::Illbatches' } );
171
    my $batch_to_delete = $builder->build_object( { class => 'Koha::Illbatches' } );
172
    my $non_existent_id = $batch_to_delete->id;
172
    my $non_existent_id = $batch_to_delete->id;
173
    $batch_to_delete->delete;
173
    $batch_to_delete->delete;
174
174
175
    $t->get_ok("//$userid:$password@/api/v1/illbatches/$non_existent_id")->status_is(404)
175
    $t->get_ok("//$userid:$password@/api/v1/ill/batches/$non_existent_id")->status_is(404)
176
        ->json_is( '/error' => 'ILL batch not found' );
176
        ->json_is( '/error' => 'ILL batch not found' );
177
177
178
    $schema->storage->txn_rollback;
178
    $schema->storage->txn_rollback;
Lines 217-223 subtest 'add() tests' => sub { Link Here
217
    };
217
    };
218
218
219
    # Unauthorized attempt to write
219
    # Unauthorized attempt to write
220
    $t->post_ok( "//$unauth_userid:$password@/api/v1/illbatches" => json => $batch_metadata )->status_is(403);
220
    $t->post_ok( "//$unauth_userid:$password@/api/v1/ill/batches" => json => $batch_metadata )->status_is(403);
221
221
222
    # Authorized attempt to write invalid data
222
    # Authorized attempt to write invalid data
223
    my $batch_with_invalid_field = {
223
    my $batch_with_invalid_field = {
Lines 225-231 subtest 'add() tests' => sub { Link Here
225
        doh => 1
225
        doh => 1
226
    };
226
    };
227
227
228
    $t->post_ok( "//$userid:$password@/api/v1/illbatches" => json => $batch_with_invalid_field )->status_is(400)
228
    $t->post_ok( "//$userid:$password@/api/v1/ill/batches" => json => $batch_with_invalid_field )->status_is(400)
229
        ->json_is(
229
        ->json_is(
230
        "/errors" => [
230
        "/errors" => [
231
            {
231
            {
Lines 237-243 subtest 'add() tests' => sub { Link Here
237
237
238
    # Authorized attempt to write
238
    # Authorized attempt to write
239
    my $batch_id =
239
    my $batch_id =
240
        $t->post_ok( "//$userid:$password@/api/v1/illbatches" => json => $batch_metadata )->status_is(201)
240
        $t->post_ok( "//$userid:$password@/api/v1/ill/batches" => json => $batch_metadata )->status_is(201)
241
        ->json_is( '/name'       => $batch_metadata->{name} )->json_is( '/backend' => $batch_metadata->{backend} )
241
        ->json_is( '/name'       => $batch_metadata->{name} )->json_is( '/backend' => $batch_metadata->{backend} )
242
        ->json_is( '/patron_id'  => $librarian->borrowernumber )
242
        ->json_is( '/patron_id'  => $librarian->borrowernumber )
243
        ->json_is( '/library_id' => $batch_metadata->{library_id} )->json_is( '/statuscode' => $batch_status->code )
243
        ->json_is( '/library_id' => $batch_metadata->{library_id} )->json_is( '/statuscode' => $batch_status->code )
Lines 245-251 subtest 'add() tests' => sub { Link Here
245
245
246
    # Authorized attempt to create with null id
246
    # Authorized attempt to create with null id
247
    $batch_metadata->{id} = undef;
247
    $batch_metadata->{id} = undef;
248
    $t->post_ok( "//$userid:$password@/api/v1/illbatches" => json => $batch_metadata )->status_is(400)
248
    $t->post_ok( "//$userid:$password@/api/v1/ill/batches" => json => $batch_metadata )->status_is(400)
249
        ->json_has('/errors');
249
        ->json_has('/errors');
250
250
251
    $schema->storage->txn_rollback;
251
    $schema->storage->txn_rollback;
Lines 282-288 subtest 'update() tests' => sub { Link Here
282
    my $batch_id = $builder->build_object( { class => 'Koha::Illbatches' } )->id;
282
    my $batch_id = $builder->build_object( { class => 'Koha::Illbatches' } )->id;
283
283
284
    # Unauthorized attempt to update
284
    # Unauthorized attempt to update
285
    $t->put_ok( "//$unauth_userid:$password@/api/v1/illbatches/$batch_id" => json =>
285
    $t->put_ok( "//$unauth_userid:$password@/api/v1/ill/batches/$batch_id" => json =>
286
            { name => 'These are not the droids you are looking for' } )->status_is(403);
286
            { name => 'These are not the droids you are looking for' } )->status_is(403);
287
287
288
    my $batch_status = $builder->build_object( { class => 'Koha::IllbatchStatuses' } );
288
    my $batch_status = $builder->build_object( { class => 'Koha::IllbatchStatuses' } );
Lines 295-301 subtest 'update() tests' => sub { Link Here
295
        statuscode => $batch_status->code
295
        statuscode => $batch_status->code
296
    };
296
    };
297
297
298
    $t->put_ok( "//$userid:$password@/api/v1/illbatches/$batch_id" => json => $batch_with_missing_field )
298
    $t->put_ok( "//$userid:$password@/api/v1/ill/batches/$batch_id" => json => $batch_with_missing_field )
299
        ->status_is(400)->json_is( "/errors" => [ { message => "Missing property.", path => "/body/name" } ] );
299
        ->status_is(400)->json_is( "/errors" => [ { message => "Missing property.", path => "/body/name" } ] );
300
300
301
    # Full object update on PUT
301
    # Full object update on PUT
Lines 307-313 subtest 'update() tests' => sub { Link Here
307
        statuscode => $batch_status->code
307
        statuscode => $batch_status->code
308
    };
308
    };
309
309
310
    $t->put_ok( "//$userid:$password@/api/v1/illbatches/$batch_id" => json => $batch_with_updated_field )
310
    $t->put_ok( "//$userid:$password@/api/v1/ill/batches/$batch_id" => json => $batch_with_updated_field )
311
        ->status_is(200)->json_is( '/name' => 'Master Ploo Koon' );
311
        ->status_is(200)->json_is( '/name' => 'Master Ploo Koon' );
312
312
313
    # Authorized attempt to write invalid data
313
    # Authorized attempt to write invalid data
Lines 317-323 subtest 'update() tests' => sub { Link Here
317
        backend => "Mock"
317
        backend => "Mock"
318
    };
318
    };
319
319
320
    $t->put_ok( "//$userid:$password@/api/v1/illbatches/$batch_id" => json => $batch_with_invalid_field )
320
    $t->put_ok( "//$userid:$password@/api/v1/ill/batches/$batch_id" => json => $batch_with_invalid_field )
321
        ->status_is(400)->json_is(
321
        ->status_is(400)->json_is(
322
        "/errors" => [
322
        "/errors" => [
323
            {
323
            {
Lines 331-343 subtest 'update() tests' => sub { Link Here
331
    my $non_existent_id = $batch_to_delete->id;
331
    my $non_existent_id = $batch_to_delete->id;
332
    $batch_to_delete->delete;
332
    $batch_to_delete->delete;
333
333
334
    $t->put_ok( "//$userid:$password@/api/v1/illbatches/$non_existent_id" => json => $batch_with_updated_field )
334
    $t->put_ok( "//$userid:$password@/api/v1/ill/batches/$non_existent_id" => json => $batch_with_updated_field )
335
        ->status_is(404);
335
        ->status_is(404);
336
336
337
    # Wrong method (POST)
337
    # Wrong method (POST)
338
    $batch_with_updated_field->{id} = 2;
338
    $batch_with_updated_field->{id} = 2;
339
339
340
    $t->post_ok( "//$userid:$password@/api/v1/illbatches/$batch_id" => json => $batch_with_updated_field )
340
    $t->post_ok( "//$userid:$password@/api/v1/ill/batches/$batch_id" => json => $batch_with_updated_field )
341
        ->status_is(404);
341
        ->status_is(404);
342
342
343
    $schema->storage->txn_rollback;
343
    $schema->storage->txn_rollback;
Lines 372-382 subtest 'delete() tests' => sub { Link Here
372
    my $batch_id = $builder->build_object( { class => 'Koha::Illbatches' } )->id;
372
    my $batch_id = $builder->build_object( { class => 'Koha::Illbatches' } )->id;
373
373
374
    # Unauthorized attempt to delete
374
    # Unauthorized attempt to delete
375
    $t->delete_ok("//$unauth_userid:$password@/api/v1/illbatches/$batch_id")->status_is(403);
375
    $t->delete_ok("//$unauth_userid:$password@/api/v1/ill/batches/$batch_id")->status_is(403);
376
376
377
    $t->delete_ok("//$userid:$password@/api/v1/illbatches/$batch_id")->status_is(204);
377
    $t->delete_ok("//$userid:$password@/api/v1/ill/batches/$batch_id")->status_is(204);
378
378
379
    $t->delete_ok("//$userid:$password@/api/v1/illbatches/$batch_id")->status_is(404);
379
    $t->delete_ok("//$userid:$password@/api/v1/ill/batches/$batch_id")->status_is(404);
380
380
381
    $schema->storage->txn_rollback;
381
    $schema->storage->txn_rollback;
382
};
382
};
383
- 

Return to bug 30719