forked from loafle/openapi-generator-original
Add test case for nil return value
This commit is contained in:
parent
50a767ef03
commit
8bf84aabe5
@ -75,7 +75,9 @@ describe "Pet" do
|
|||||||
|
|
||||||
it "should create a pet" do
|
it "should create a pet" do
|
||||||
pet = SwaggerClient::Pet.new('id' => 10002, 'name' => "RUBY UNIT TESTING")
|
pet = SwaggerClient::Pet.new('id' => 10002, 'name' => "RUBY UNIT TESTING")
|
||||||
SwaggerClient::PetApi.add_pet(:body => pet)
|
result = SwaggerClient::PetApi.add_pet(:body => pet)
|
||||||
|
# nothing is returned
|
||||||
|
result.should be_nil
|
||||||
|
|
||||||
pet = SwaggerClient::PetApi.get_pet_by_id(10002)
|
pet = SwaggerClient::PetApi.get_pet_by_id(10002)
|
||||||
pet.id.should == 10002
|
pet.id.should == 10002
|
||||||
|
Loading…
x
Reference in New Issue
Block a user