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

(-)a/t/db_dependent/api/v1/patrons.t (-2 / +5 lines)
Lines 134-140 subtest 'add() tests' => sub { Link Here
134
    $schema->storage->txn_rollback;
134
    $schema->storage->txn_rollback;
135
135
136
    subtest 'librarian access tests' => sub {
136
    subtest 'librarian access tests' => sub {
137
        plan tests => 20;
137
        plan tests => 21;
138
138
139
        $schema->storage->txn_begin;
139
        $schema->storage->txn_begin;
140
140
Lines 197-202 subtest 'add() tests' => sub { Link Here
197
        $tx->req->cookies({ name => 'CGISESSID', value => $session_id });
197
        $tx->req->cookies({ name => 'CGISESSID', value => $session_id });
198
        $t->request_ok($tx)
198
        $t->request_ok($tx)
199
          ->status_is(201, 'Patron created successfully')
199
          ->status_is(201, 'Patron created successfully')
200
          ->header_like(
201
            Location => qr|^\/api\/v1\/patrons/\d*|,
202
            'SWAGGER3.4.1'
203
          )
200
          ->json_has('/patron_id', 'got a patron_id')
204
          ->json_has('/patron_id', 'got a patron_id')
201
          ->json_is( '/cardnumber' => $newpatron->{ cardnumber })
205
          ->json_is( '/cardnumber' => $newpatron->{ cardnumber })
202
          ->json_is( '/surname'    => $newpatron->{ surname })
206
          ->json_is( '/surname'    => $newpatron->{ surname })
203
- 

Return to bug 23860