Sha256: d110096c28c3b03206524ecfb879732e78ce8bdc098aa17ae625d852a9638888

Contents?: true

Size: 710 Bytes

Versions: 3

Compression:

Stored size: 710 Bytes

Contents

require "./spec/spec_helper"

describe Economic::Proxies::Actions::DebtorContact::All do
  let(:session) { make_session }
  let(:proxy) { Economic::DebtorContactProxy.new(session) }

  subject {
    Economic::Proxies::Actions::DebtorContact::All.new(proxy)
  }

  before :each do
    allow(session).to receive(:number) { 123 }
  end

  describe "#call" do
    it "returns debtor contacts" do
      stub_request("Debtor_GetDebtorContacts", nil, :multiple)
      expect(subject.call.first).to be_instance_of(Economic::DebtorContact)
    end

    it "returns empty array when nothing is found" do
      stub_request("Debtor_GetDebtorContacts", nil, :none)
      expect(subject.call).to be_empty
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rconomic-0.7.0 spec/economic/proxies/actions/debtor_contact/all_spec.rb
rconomic-0.6.1 spec/economic/proxies/actions/debtor_contact/all_spec.rb
rconomic-0.6.0 spec/economic/proxies/actions/debtor_contact/all_spec.rb