Sha256: 4489da90ca0ad3f1ee6b5521dc5c01a26741b88ae3f3a3c5a11e4f86fc3a91d7

Contents?: true

Size: 997 Bytes

Versions: 16

Compression:

Stored size: 997 Bytes

Contents

# frozen_string_literal: true

require 'spec_helpers/client'
require 'spec_helpers/api_request'

RSpec.describe FinApps::REST::SignedDocumentsDownloads do
  include SpecHelpers::Client

  let(:api_client) { client }
  let(:document) { described_class.new(api_client) }

  describe '#show' do
    subject(:show) do
      document.show(:consumer_id, :signature_request_id)
    end

    context 'when missing signature request id' do
      subject(:show) { document.show(:consumer_id, nil) }

      it 'raises an error when missing consumer id' do
        expect { show }.to raise_error(FinAppsCore::MissingArgumentsError)
      end
    end

    context 'when missing consumer id' do
      subject(:show) { document.show(nil, :signature_request_id) }

      it 'raises an error when missing signature request id' do
        expect { show }.to raise_error(FinAppsCore::MissingArgumentsError)
      end
    end

    it_behaves_like 'an API request'
    it_behaves_like 'a successful request'
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
finapps-6.13.1 spec/rest/signed_documents_downloads_spec.rb
finapps-6.13.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.12.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.11.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.10.2 spec/rest/signed_documents_downloads_spec.rb
finapps-6.10.1 spec/rest/signed_documents_downloads_spec.rb
finapps-6.10.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.9.2 spec/rest/signed_documents_downloads_spec.rb
finapps-6.9.1 spec/rest/signed_documents_downloads_spec.rb
finapps-6.9.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.8.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.7.1 spec/rest/signed_documents_downloads_spec.rb
finapps-6.7.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.6.1 spec/rest/signed_documents_downloads_spec.rb
finapps-6.6.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.5.0 spec/rest/signed_documents_downloads_spec.rb