Sha256: 20671549182fe0aa608b966deefe60dcb540921978be4d16aa2f510e100a265b
Contents?: true
Size: 1.73 KB
Versions: 15
Compression:
Stored size: 1.73 KB
Contents
require 'spec_helper' require 'json_spec' require 'json' require_relative './test_utils' config = Dropbox::Sign.configure api_client = Dropbox::Sign::ApiClient.new(config) describe Dropbox::Sign::ApiClient do fixtures = [ 'AccountCreateRequest', 'AccountUpdateRequest', 'AccountVerifyRequest', 'ApiAppCreateRequest', 'ApiAppUpdateRequest', 'EmbeddedEditUrlRequest', 'OAuthTokenGenerateRequest', 'OAuthTokenRefreshRequest', 'ReportCreateRequest', 'SignatureRequestBulkCreateEmbeddedWithTemplateRequest', 'SignatureRequestBulkSendWithTemplateRequest', 'SignatureRequestCreateEmbeddedRequest', 'SignatureRequestCreateEmbeddedWithTemplateRequest', 'SignatureRequestRemindRequest', 'SignatureRequestSendRequest', 'SignatureRequestSendWithTemplateRequest', 'SignatureRequestUpdateRequest', 'TeamAddMemberRequest', 'TeamCreateRequest', 'TeamRemoveMemberRequest', 'TeamUpdateRequest', 'TemplateAddUserRequest', 'TemplateCreateEmbeddedDraftRequest', 'TemplateRemoveUserRequest', 'TemplateUpdateFilesRequest', 'UnclaimedDraftCreateEmbeddedRequest', 'UnclaimedDraftCreateEmbeddedWithTemplateRequest', 'UnclaimedDraftCreateRequest', 'UnclaimedDraftEditAndResendRequest', ] context 'Fixture tests' do fixtures.each do |fixture| fixture_data = get_fixture_data(fixture) fixture_data.each do |key, data| it "#{fixture}.#{key}" do classname = "Dropbox::Sign::#{fixture}" obj = api_client.convert_to_type(data, classname) serialized = obj.to_hash(false) expect(obj.class.to_s).to eq(classname) expect(serialized.to_json).to be_json_eql(data.to_json) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems