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

(-)a/api/v1/swagger/definitions/ticket.yaml (+5 lines)
Lines 5-10 properties: Link Here
5
    type: integer
5
    type: integer
6
    description: Internal ticket identifier
6
    description: Internal ticket identifier
7
    readOnly: true
7
    readOnly: true
8
  source:
9
    type: string
10
    enum:
11
      - catalog
8
  reported_date:
12
  reported_date:
9
    type:
13
    type:
10
      - string
14
      - string
Lines 60-64 properties: Link Here
60
    description: Number of updates
64
    description: Number of updates
61
additionalProperties: false
65
additionalProperties: false
62
required:
66
required:
67
  - source
63
  - title
68
  - title
64
  - body
69
  - body
(-)a/t/db_dependent/api/v1/tickets.t (-1 / +6 lines)
Lines 172-177 subtest 'add() tests' => sub { Link Here
172
172
173
    my $biblio = $builder->build_sample_biblio();
173
    my $biblio = $builder->build_sample_biblio();
174
    my $ticket = {
174
    my $ticket = {
175
        source    => 'catalog',
175
        biblio_id => $biblio->id,
176
        biblio_id => $biblio->id,
176
        title     => "Test ticket",
177
        title     => "Test ticket",
177
        body      => "Test ticket details",
178
        body      => "Test ticket details",
Lines 185-190 subtest 'add() tests' => sub { Link Here
185
    # Authorized attempt to write invalid data
186
    # Authorized attempt to write invalid data
186
    my $ticket_with_invalid_field = {
187
    my $ticket_with_invalid_field = {
187
        blah      => "Something wrong",
188
        blah      => "Something wrong",
189
        source    => 'catalog',
188
        biblio_id => $biblio->id,
190
        biblio_id => $biblio->id,
189
        title     => "Test ticket",
191
        title     => "Test ticket",
190
        body      => "Test ticket details",
192
        body      => "Test ticket details",
Lines 230-235 subtest 'add() tests' => sub { Link Here
230
232
231
    # Authorized attempt to write missing data
233
    # Authorized attempt to write missing data
232
    my $ticket_with_missing_field = {
234
    my $ticket_with_missing_field = {
235
        source    => 'catalog',
233
        biblio_id => $biblio->id,
236
        biblio_id => $biblio->id,
234
        body      => "Test ticket details",
237
        body      => "Test ticket details",
235
    };
238
    };
Lines 282-287 subtest 'update() tests' => sub { Link Here
282
285
283
    # Attempt partial update on a PUT
286
    # Attempt partial update on a PUT
284
    my $ticket_with_missing_field = {
287
    my $ticket_with_missing_field = {
288
        source    => 'catalog',
285
        body      => "Test ticket details",
289
        body      => "Test ticket details",
286
    };
290
    };
287
291
Lines 292-297 subtest 'update() tests' => sub { Link Here
292
296
293
    # Full object update on PUT
297
    # Full object update on PUT
294
    my $ticket_with_updated_field = {
298
    my $ticket_with_updated_field = {
299
        source    => 'catalog',
295
        title     => "Test ticket update",
300
        title     => "Test ticket update",
296
        body      => "Test ticket update details",
301
        body      => "Test ticket update details",
297
    };
302
    };
Lines 303-308 subtest 'update() tests' => sub { Link Here
303
    # Authorized attempt to write invalid data
308
    # Authorized attempt to write invalid data
304
    my $ticket_with_invalid_field = {
309
    my $ticket_with_invalid_field = {
305
        blah        => "Ticket Blah",
310
        blah        => "Ticket Blah",
311
        source    => 'catalog',
306
        title     => "Test ticket update",
312
        title     => "Test ticket update",
307
        body      => "Test ticket update details",
313
        body      => "Test ticket update details",
308
    };
314
    };
309
- 

Return to bug 35616