Sha256: aa41b4f9cdcb2c2cb4049fe45fe60b50d394f0d5dc98d07ca8f8529633f9f4e0

Contents?: true

Size: 1013 Bytes

Versions: 5

Compression:

Stored size: 1013 Bytes

Contents

# frozen_string_literal: true

require 'spec_helpers/client'
require 'rest/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
    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

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
finapps-5.0.43 spec/rest/signed_documents_downloads_spec.rb
finapps-5.0.41 spec/rest/signed_documents_downloads_spec.rb
finapps-5.0.38 spec/rest/signed_documents_downloads_spec.rb
finapps-5.0.36 spec/rest/signed_documents_downloads_spec.rb
finapps-5.0.35 spec/rest/signed_documents_downloads_spec.rb