diff --git a/lib/stripe/application_fee.rb b/lib/stripe/application_fee.rb index fa6512be..68b7182f 100644 --- a/lib/stripe/application_fee.rb +++ b/lib/stripe/application_fee.rb @@ -14,7 +14,7 @@ module Stripe private def refund_url - url + '/refund' + url + '/refunds' end end end diff --git a/test/stripe/application_fee_test.rb b/test/stripe/application_fee_test.rb index e7eb814c..a453af49 100644 --- a/test/stripe/application_fee_test.rb +++ b/test/stripe/application_fee_test.rb @@ -13,7 +13,9 @@ module Stripe should "application fees should be refundable" do @mock.expects(:get).never - @mock.expects(:post).once.returns(make_response({:id => "fee_test_fee", :refunded => true})) + @mock.expects(:post).once. + with("#{Stripe.api_base}/v1/application_fees/test_application_fee/refunds", nil, ''). + returns(make_response({:id => "fee_test_fee", :refunded => true})) fee = Stripe::ApplicationFee.new("test_application_fee") fee.refund assert fee.refunded