Sha256: bac24dda476d58b11811206f6aedf410b4af477c8d86cb9f2bbf5c5b822f6e22

Contents?: true

Size: 1.89 KB

Versions: 2

Compression:

Stored size: 1.89 KB

Contents

=begin
#Web API Swagger specification

#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

OpenAPI spec version: 1.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.3.0-SNAPSHOT

=end

require 'spec_helper'
require 'json'
# Unit tests for AsposeCellsCloud::CellsWorkbookApi
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
# Please update as you see appropriate
describe 'CellsWorkbookApi' do
  before do
    # run before each test
    if $access_token == nil then
        conf = AsposeCellsCloud::Configuration.new
        conf.base_path = ""
        instance = AsposeCellsCloud::OAuthApi.new(AsposeCellsCloud::ApiClient.new(conf))
        $access_token = instance.o_auth_post($grant_type,$client_id,$client_secret).access_token
    end
  
    conf = AsposeCellsCloud::Configuration.new
    conf.access_token = $access_token	
    client = AsposeCellsCloud::ApiClient.new(conf)
    client.default_headers["Authorization"] ="Bearer " + $access_token
    @instance = AsposeCellsCloud::CellsWorkbookApi.new(client)
  end

  after do
    # run after each test
  end
  describe 'test an instance of CellsWorkbookApi' do
    it 'should create an instance of CellsWorkbookApi' do
      expect(@instance).to be_instance_of(AsposeCellsCloud::CellsWorkbookApi)
    end
  end


  describe 'cells_workbook_put_convert_workbook test' do
    it "should work" do
      format = 'pdf'
      password = nil
      out_path = nil
      aFile = File.new('/home/roywang/asposecellscloudsdk/data/Book1.xlsx', 'r')
      book = aFile.sysread(aFile.size)
      aFile.close
      @instance.cells_workbook_put_convert_workbook(book,{:format=>format})
      # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aspose_cells_cloud-19.6 spec/api/cells_one_api_spec.rb
aspose_cells_cloud-19.2.1 spec/api/cells_one_api_spec.rb