Sha256: 71be05b85883deddc8151c5a388dd560a388e09f826a6969fb9a77bda7bfba07

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

require 'spec_helper'

describe Dune::Balanced::CustomerDecorator do
  let(:remote_source) { double('Balanced::Customer') }
  let(:source) do
    double('Dune::Balanced::Customer',fetch: remote_source)
  end
  subject { described_class.new(source) }

  describe 'bank account name' do
    it 'gets this info fetching the bank accout of the customer' do
      bank_account = double('Balanced::BankAccount',
                            bank_name:      'JPMORGAN CHASE BANK',
                            account_number: 'xxxxxx0002')
      remote_source.stub(:bank_accounts).and_return([bank_account])
      expect(subject.bank_account_name).to eql('JPMORGAN CHASE BANK xxxxxx0002')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dune-balanced-1.0.0 spec/decorators/dune/balanced/customer_decorator_spec.rb