Sha256: 8effc2de9a9f199a5e7debb8d528c52799459a72a52a358dabbd07ae187367a4

Contents?: true

Size: 812 Bytes

Versions: 1

Compression:

Stored size: 812 Bytes

Contents

require 'spec_helper'
require 'json_spec'
require_relative '../test_utils'

describe Dropbox::Sign::SubFormFieldsPerDocumentBase do
  context 'SubFormFieldsPerDocument' do
    fixture_data = get_fixture_data('SubFormFieldsPerDocument')

    fixture_data.each do |type, data|
      it "SubFormFieldsPerDocument of type #{type} is instantiated" do
        payload = { form_fields_per_document: [data] }

        obj = Dropbox::Sign::SignatureRequestSendRequest.init(payload)

        form_fields_per_document = obj.form_fields_per_document[0]
        serialized = form_fields_per_document.to_hash(false)
        classname = "Dropbox::Sign::#{type}"

        expect(form_fields_per_document.class.to_s).to eq(classname)
        expect(serialized.to_json).to be_json_eql(JSON.dump(data))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dropbox-sign-1.0.0.pre.beta2301 spec/models/sub_form_fields_per_document_base_spec.rb