Sha256: d568d4ffcfc3186a007d7ab56c09d391e16cbbda217886430f80fcebfc4dd4d9

Contents?: true

Size: 989 Bytes

Versions: 19

Compression:

Stored size: 989 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
    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

19 entries across 19 versions & 1 rubygems

Version Path
finapps-6.4.3 spec/rest/signed_documents_downloads_spec.rb
finapps-6.4.2 spec/rest/signed_documents_downloads_spec.rb
finapps-6.4.1 spec/rest/signed_documents_downloads_spec.rb
finapps-6.4.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.3.1 spec/rest/signed_documents_downloads_spec.rb
finapps-6.3.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.2.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.1.0 spec/rest/signed_documents_downloads_spec.rb
finapps-6.0.0 spec/rest/signed_documents_downloads_spec.rb
finapps-5.4.1 spec/rest/signed_documents_downloads_spec.rb
finapps-5.4.0 spec/rest/signed_documents_downloads_spec.rb
finapps-5.3.0 spec/rest/signed_documents_downloads_spec.rb
finapps-5.2.1 spec/rest/signed_documents_downloads_spec.rb
finapps-5.2.0 spec/rest/signed_documents_downloads_spec.rb
finapps-5.1.0 spec/rest/signed_documents_downloads_spec.rb
finapps-5.0.47 spec/rest/signed_documents_downloads_spec.rb
finapps-5.0.46 spec/rest/signed_documents_downloads_spec.rb
finapps-5.0.45 spec/rest/signed_documents_downloads_spec.rb
finapps-5.0.44 spec/rest/signed_documents_downloads_spec.rb