Sha256: 60e1fac82f75a909ec85c770ea799fea56835b94c7f6d5d8d7c6d9c753f98f1b

Contents?: true

Size: 920 Bytes

Versions: 5

Compression:

Stored size: 920 Bytes

Contents

# frozen_string_literal: true

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

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

  let(:api_client) { client }
  let(:document) { FinApps::REST::VerixPdfDocuments.new(api_client) }

  describe '#show' do
    context 'when missing parameters' do
      subject { document.show(nil, :provider_id) }
      it 'raises an error when missing record id' do
        expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
      end

      subject { document.show(:record_id, nil) }
      it 'raises an error when missing provider id' do
        expect { subject }.to raise_error(FinAppsCore::MissingArgumentsError)
      end
    end

    subject(:show) do
      document.show(
        :record_id,
        :provider_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.32 spec/rest/verix/verix_pdf_documents_spec.rb
finapps-5.0.31 spec/rest/verix/verix_pdf_documents_spec.rb
finapps-5.0.30 spec/rest/verix/verix_pdf_documents_spec.rb
finapps-5.0.29 spec/rest/verix/verix_pdf_documents_spec.rb
finapps-5.0.28 spec/rest/verix/verix_pdf_documents_spec.rb