Merge pull request #1298 from geekerzp/ruby_upload_file

[Ruby] Add test case in ruby client
This commit is contained in:
wing328 2015-09-27 22:20:20 +08:00
commit baca3027f4

View File

@ -116,5 +116,14 @@ describe "Pet" do
# nothing is returned
result.should be_nil
end
it "should upload a file with form parameter to a pet" do
pet = Petstore::Pet.new('id' => 10002, 'name' => 'RUBY UNIT TESTING')
result = @pet_api.add_pet(body: pet)
result.should be_nil
result = @pet_api.upload_file(10002, file: File.new('hello.txt'), additional_metadata: 'metadata')
result.should be_nil
end
end
end