Sha256: 852d5121bdae7f1bbdb0a2ffaf6965c84ed8e1b376e1d19ba9d41f702db1dda3
Contents?: true
Size: 782 Bytes
Versions: 4
Compression:
Stored size: 782 Bytes
Contents
require 'spec_helper' describe "Refund", :vcr, class: Pin::Refund do before(:each) do Pin::Base.new(ENV["PIN_SECRET"], :test) end it "should list all refunds made to a charge given a token" do Pin::Refund.find('ch_S_3tP81Q9_sDngSv27gShQ')[0]['token'].should == "rf_O4lHrNzwXYmMmTbBq0ZLPw" end it "should return nothing if looking for a charge without a refund" do Pin::Refund.find('ch_rqPIWDK71YU46M4MAQHQKg').should == [] end it "should create a refund for a given amount and charge" do Pin::Refund.create('ch_NLEbb_xRgtyz58RGQ5zVqg', "400")['amount'].should == 400 end it "should create a refund for the entire amount of a charge if no amount given" do Pin::Refund.create('ch_QG_2Gl5x47WEzTdBIwnluQ')['amount'].should == 7900 end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
pin_up-0.4.2 | spec/refund_spec.rb |
pin_up-0.4.1 | spec/refund_spec.rb |
pin_up-0.3.1 | spec/refund_spec.rb |
pin_up-0.3.0 | spec/refund_spec.rb |