Skip to content

Commit 8bf84aa

Browse files
committed
Add test case for nil return value
1 parent 50a767e commit 8bf84aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

samples/client/petstore/ruby/spec/pet_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@
7575

7676
it "should create a pet" do
7777
pet = SwaggerClient::Pet.new('id' => 10002, 'name' => "RUBY UNIT TESTING")
78-
SwaggerClient::PetApi.add_pet(:body => pet)
78+
result = SwaggerClient::PetApi.add_pet(:body => pet)
79+
# nothing is returned
80+
result.should be_nil
7981

8082
pet = SwaggerClient::PetApi.get_pet_by_id(10002)
8183
pet.id.should == 10002

0 commit comments

Comments
 (0)