Sha256: c5336b287f3875761e4e40147fa774d82e1b2d552f0bd21f7b5cb9460a10a88d

Contents?: true

Size: 1.21 KB

Versions: 5

Compression:

Stored size: 1.21 KB

Contents

describe Moip2::Api do
  let(:auth) { Moip2::Auth::Basic.new("", "") }
  let(:client) { Moip2::Client.new(:sandbox, auth) }
  let(:api) { described_class.new client }

  describe "#order" do
    it "returns an OrderApi" do
      expect(api.order).to be_a(Moip2::OrderApi)
    end
  end

  describe "#payment" do
    it "returns a PaymentApi" do
      expect(api.payment).to be_a(Moip2::PaymentApi)
    end
  end

  describe "#invoice" do
    it { expect(api.invoice).to be_a Moip2::InvoiceApi }
  end

  describe "#refund" do
    it { expect(api.refund).to be_a Moip2::RefundApi }
  end

  describe "#keys" do
    it { expect(api.keys).to be_a Moip2::KeysApi }
  end

  describe "#customer" do
    it { expect(api.customer).to be_a Moip2::CustomerApi }
  end

  describe "#multi_order" do
    it { expect(api.multi_order).to be_a Moip2::MultiOrderApi }
  end

  describe "#multi_payment" do
    it { expect(api.multi_payment).to be_a Moip2::MultiPaymentApi }
  end

  describe "#accounts" do
    it { expect(api.accounts).to be_a Moip2::AccountsApi }
  end

  describe "#connect" do
    it { expect(api.connect).to be_a Moip2::ConnectApi }
    it { expect(api.connect.client.uri).to eq "https://connect-sandbox.moip.com.br" }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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