test/test_helper.rb in stripe-1.14.0 vs test/test_helper.rb in stripe-1.15.0

- old
+ new

@@ -69,28 +69,50 @@ :url => "/v1/balance/history" } end def test_application_fee(params={}) + id = params[:id] || 'fee_test_fee' { :refunded => false, :amount => 100, :application => "ca_test_application", :user => "acct_test_user", :charge => "ch_test_charge", - :id => "fee_test_fee", + :id => id, :livemode => false, :currency => "usd", :object => "application_fee", + :refunds => test_application_fee_refund_array(id), :created => 1304114826 }.merge(params) end +def test_application_fee_refund(params = {}) + { + :object => 'fee_refund', + :amount => 30, + :currency => "usd", + :created => 1308595038, + :id => "ref_test_app_fee_refund", + :fee => "ca_test_application", + :metadata => {} + }.merge(params) +end + def test_application_fee_array { :data => [test_application_fee, test_application_fee, test_application_fee], :object => 'list', :url => '/v1/application_fees' + } +end + +def test_application_fee_refund_array(fee_id) + { + :data => [test_application_fee_refund, test_application_fee_refund, test_application_fee_refund], + :object => 'list', + :url => '/v1/application_fees/' + fee_id + '/refunds' } end def test_customer(params={}) id = params[:id] || 'c_test_customer'