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

(-)a/t/db_dependent/api/v1/tickets.t (-2 / +20 lines)
Lines 146-152 subtest 'get() tests' => sub { Link Here
146
146
147
subtest 'add() tests' => sub {
147
subtest 'add() tests' => sub {
148
148
149
    plan tests => 21;
149
    plan tests => 22;
150
150
151
    $schema->storage->txn_begin;
151
    $schema->storage->txn_begin;
152
152
Lines 244-249 subtest 'add() tests' => sub { Link Here
244
        ]
244
        ]
245
    );
245
    );
246
246
247
    subtest 'public add' => sub {
248
        plan tests => 7;
249
250
        delete $ticket->{ticket_id};
251
252
        my $useridp = $patron->userid;
253
        $patron->set_password( { password => $password, skip_validation => 1 } );
254
255
        $ticket_id =
256
            $t->post_ok( "//$useridp:$password@/api/v1/public/tickets" => json => $ticket )
257
            ->status_is( 201, 'SWAGGER3.2.1' )->header_like(
258
            Location => qr|^\/api\/v1\/public\/tickets/\d*|,
259
            'SWAGGER3.4.1'
260
        )->json_is( '/biblio_id' => $ticket->{biblio_id} )->json_is( '/title' => $ticket->{title} )
261
            ->json_is( '/body' => $ticket->{body} )->json_is( '/reporter_id' => $patron->id )
262
            ->tx->res->json->{ticket_id};
263
264
    };
265
247
    $schema->storage->txn_rollback;
266
    $schema->storage->txn_rollback;
248
};
267
};
249
268
250
- 

Return to bug 36612