From c70ca9d572341c89641c7fa0f732340835b58f62 Mon Sep 17 00:00:00 2001 From: geekerzp Date: Fri, 25 Sep 2015 17:33:39 +0800 Subject: [PATCH] Add test case in ruby client --- samples/client/petstore/ruby/spec/pet_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/samples/client/petstore/ruby/spec/pet_spec.rb b/samples/client/petstore/ruby/spec/pet_spec.rb index 5d379bf4921..c9858eca37a 100644 --- a/samples/client/petstore/ruby/spec/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/pet_spec.rb @@ -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