Bug 23859: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Tomas Cohen Arazi 2019-10-21 14:41:59 -03:00 committed by Martin Renvoize
parent c0b911c2d7
commit bd7a012c52
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 6 additions and 2 deletions

View File

@ -140,7 +140,7 @@ subtest 'get() tests' => sub {
subtest 'add() tests' => sub {
plan tests => 17;
plan tests => 18;
$schema->storage->txn_begin;
@ -190,7 +190,11 @@ subtest 'add() tests' => sub {
$tx->req->env({ REMOTE_ADDR => $remote_address });
my $city_id =
$t->request_ok($tx)
->status_is(200)
->status_is( 201, 'SWAGGER3.2.1' )
->header_like(
Location => qr|^\/api\/v1\/cities/\d*|,
'SWAGGER3.4.1'
)
->json_is( '/name' => $city->{name} )
->json_is( '/state' => $city->{state} )
->json_is( '/postal_code' => $city->{postal_code} )