These are chat archives for rebelidealist/stripe-ruby-mock

10th
Sep 2014
maxgurewitz
@maxgurewitz
Sep 10 2014 17:41
  describe "two-step charge (auth, then capture)" do
    it "changes captured status upon #capture" do
      charge = Stripe::Charge.create({
        amount: 777,
        currency: 'USD',
        card: 'card_token_abc',
        capture: false
      })
      returned_charge = charge.capture({ amount: 677 })
      expect(charge.captured).to be_true
      expect(returned_charge.amount_refunded).to eq(100)
      expect(returned_charge.id).to eq(charge.id)
      expect(returned_charge.captured).to be_true
    end
  end
maxgurewitz
@maxgurewitz
Sep 10 2014 18:14
@mindeavor See isolated test example above!