From 2e03ecc4b83de919b374d77aa32faacd5e2fff93 Mon Sep 17 00:00:00 2001 From: dvz5 Date: Sun, 1 Nov 2015 23:10:20 +0100 Subject: [PATCH] Update 01_pet_api.t Add tests for photoUrls, to check correct mapping from object attribute name to JSON attribute name. --- samples/client/petstore/perl/t/01_pet_api.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/client/petstore/perl/t/01_pet_api.t b/samples/client/petstore/perl/t/01_pet_api.t index 6b731b846fe..bb5f163bd82 100644 --- a/samples/client/petstore/perl/t/01_pet_api.t +++ b/samples/client/petstore/perl/t/01_pet_api.t @@ -1,4 +1,4 @@ -use Test::More tests => 33; +use Test::More tests => 35; use Test::Exception; use lib 'lib'; @@ -59,6 +59,9 @@ is $get_pet_hash->{category}->{id}, '22', 'get the proper category id from get_p is $get_pet_hash->{category}->{name}, 'perl', 'get the proper category from get_pet_by_id'; is $get_pet_hash->{tags}[0]->{name}, 'just kidding', 'get the proper tag from get_pet_by_id'; is $get_pet_hash->{tags}[0]->{id}, '11', 'get the proper tag id from get_pet_by_id'; +is $get_pet_hash->{photoUrls}->[0], '123', 'get the proper photoUrl from get_pet_by_id'; +is $get_pet_hash->{photoUrls}->[1], 'oop', 'get the proper photoUrl from get_pet_by_id'; + my $update_pet_with_form = $api->update_pet_with_form(pet_id => $pet_id, name => 'test_name', status => 'sold'); is $update_pet_with_form, undef, 'get the null response from update_pet_wth_form';