Skip to content

Instantly share code, notes, and snippets.

@Pomeha
Created October 10, 2018 14:28
Show Gist options
  • Save Pomeha/32b9aebe0b025f1f49029aadeb687c24 to your computer and use it in GitHub Desktop.
Save Pomeha/32b9aebe0b025f1f49029aadeb687c24 to your computer and use it in GitHub Desktop.
before do
paypal_payout_object = double
payout_batch = double
allow(payout_batch).to receive_message_chain(:batch_header, :payout_batch_id).and_return(payout_batch_id)
allow(payout_batch).to receive_message_chain(:batch_header, :batch_status).and_return(payout_batch_status)
allow(PayPal::SDK::REST::DataTypes::Payout).to receive(:new).and_return(paypal_payout_object)
allow(paypal_payout_object).to receive(:create).and_return(payout_batch)
end
let(:payout_batch_id) { 1_337 }
let(:payout_batch_status) { 'SUCCESS' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment