Sha256: 3e1d5839951dd7b528894d23b022f0293f10a9f73ab60a89505cc91470d4275e

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

require 'spec_helper'

describe 'Uploading File' do
  describe 'Create Embedded Signature Request' do
    before { stub_post('/signature_request/create_embedded', 'signature_request') }

    it 'works with simple pdf' do
      expect(HelloSign.create_embedded_signature_request({files: [load_file('empty.pdf')]}))
    end

    it 'works with null byte string' do
      expect(HelloSign.create_embedded_signature_request({files: ["\0"]}))
    end

    it 'works with empty string' do
      expect(HelloSign.create_embedded_signature_request({files: ['']}))
    end
  end

  describe 'Create Unclaimed Draft' do
    before { stub_post('/unclaimed_draft/create', 'unclaimed_draft') }

    it 'works with simple pdf' do
      expect(HelloSign.create_unclaimed_draft({files: [load_file('empty.pdf')]}))
    end

    it 'works with null byte string' do
      expect(HelloSign.create_unclaimed_draft({files: ["\0"]}))
    end

    it 'works with empty string' do
      expect(HelloSign.create_unclaimed_draft({files: ['']}))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hellosign-ruby-sdk-3.0.18 spec/scenarios/uploads_spec.rb
hellosign-ruby-sdk-3.0.17 spec/scenarios/uploads_spec.rb
hellosign-ruby-sdk-3.0.15 spec/scenarios/uploads_spec.rb