Sha256: fbad8a8b1f37905cb6f6f88fa62daaf2a93c1d08cb48a533140a34b3dac9490e
Contents?: true
Size: 827 Bytes
Versions: 2
Compression:
Stored size: 827 Bytes
Contents
require File.expand_path('../../test_helper', __FILE__) module Paid class InvoiceTest < Test::Unit::TestCase should "retrieve should retrieve invoices" do @mock.expects(:get).once.returns(test_response(test_invoice)) i = Paid::Invoice.retrieve('in_test_invoice') assert_equal 'inv_test_invoice', i.id end should "create should create a new invoice" do @mock.expects(:post).once.returns(test_response(test_invoice)) i = Paid::Invoice.create assert_equal "inv_test_invoice", i.id end should "charges should be issuable" do @mock.expects(:get).never @mock.expects(:post).once.returns(test_response({:id => "ch_test_charge", :issued_at => 123467890})) i = Paid::Invoice.new("test_charge") i.issue assert !i.issued_at.nil? end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
paid-0.0.3 | test/paid/invoice_test.rb |
paid-0.0.2 | test/paid/invoice_test.rb |