Sha256: eabd45bf902b2f86564b8c8e5984b8c1129d2a297351082d9072cfbdda912a88

Contents?: true

Size: 728 Bytes

Versions: 4

Compression:

Stored size: 728 Bytes

Contents

describe Moip2::BalancesApi do
  let(:balances_api) { described_class.new sandbox_oauth_client }

  describe "#show" do
    let(:balances) do
      VCR.use_cassette("get_balances") do
        balances_api.show
      end
    end

    it {
      expect(balances).to have_attributes(
        unavailable: be_an(Array),
        future: be_an(Array),
        current: be_an(Array),
      )
    }
    it { expect(balances.unavailable.first).to have_attributes(amount: be_a(Numeric), currency: be_a(String)) }
    it { expect(balances.future.first).to have_attributes(amount: be_a(Numeric), currency: be_a(String)) }
    it { expect(balances.current.first).to have_attributes(amount: be_a(Numeric), currency: be_a(String)) }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
moip2-1.3.1 spec/moip2/balances_api_spec.rb
moip2-1.2.1 spec/moip2/balances_api_spec.rb
moip2-1.2.0 spec/moip2/balances_api_spec.rb
moip2-1.1.0 spec/moip2/balances_api_spec.rb