Sha256: ede4461184728127c54ba0100b33de64d561191384034abf9fadf264beccc320
Contents?: true
Size: 1.69 KB
Versions: 1
Compression:
Stored size: 1.69 KB
Contents
=begin #HelloSign API #HelloSign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.3.0 =end require 'spec_helper' require 'json_spec' require_relative '../test_utils' config = do_config api_client = HelloSign::ApiClient.new(config) describe HelloSign::OAuthApi do context 'OAuthApiTest' do api = HelloSign::OAuthApi.new it 'testTokenGenerate' do request_class = 'OAuthTokenGenerateRequest' request_data = get_fixture_data(request_class)[:default] response_class = 'OAuthTokenResponse' response_data = get_fixture_data(response_class)[:default] set_expected_response(200, JSON.dump(response_data)) expected = api_client.convert_to_type(response_data, response_class) obj = api_client.convert_to_type(request_data, request_class) result = api.oauth_token_generate(obj) expect(result.class.to_s).to eq("HelloSign::#{response_class}") expect(result.to_json).to be_json_eql(expected.to_json) end it 'testTokenRefresh' do request_class = 'OAuthTokenRefreshRequest' request_data = get_fixture_data(request_class)[:default] response_class = 'OAuthTokenResponse' response_data = get_fixture_data(response_class)[:default] set_expected_response(200, JSON.dump(response_data)) expected = api_client.convert_to_type(response_data, response_class) obj = api_client.convert_to_type(request_data, request_class) result = api.oauth_token_refresh(obj) expect(result.class.to_s).to eq("HelloSign::#{response_class}") expect(result.to_json).to be_json_eql(expected.to_json) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hellosign-ruby-sdk-6.0.0.pre.beta | spec/api/oauth_api_spec.rb |