Sha256: 70e755325497fe4b9601f63686a7f476e7c6634dfe4620088907c13dad17a046
Contents?: true
Size: 954 Bytes
Versions: 6
Compression:
Stored size: 954 Bytes
Contents
# coding: utf-8 require 'spec_helper' describe Moip::Assinaturas::Payment do before(:all) do FakeWeb.register_uri( :get, "https://TOKEN:KEY@api.moip.com.br/assinaturas/v1/invoices/13/payments", body: File.join(File.dirname(__FILE__), '..', 'fixtures', 'list_payments.json'), status: [200, 'OK'] ) FakeWeb.register_uri( :get, "https://TOKEN:KEY@api.moip.com.br/assinaturas/v1/payments/6", body: File.join(File.dirname(__FILE__), '..', 'fixtures', 'details_payment.json'), status: [200, 'OK'] ) end it "should get all payments from a invoice" do request = Moip::Assinaturas::Payment.list(13) request[:success].should be_true request[:payments].size.should == 1 end it "should get details of a payment" do request = Moip::Assinaturas::Payment.details(6) request[:success].should be_true request[:payment][:id].should == 6 end end
Version data entries
6 entries across 6 versions & 1 rubygems