Rimuove link al portale Stripe in area cliente, aggiunge flusso admin per PDF fattura e email, blocca checkout senza dati di fatturazione, allinea prezzi a €4,90/€39,90 e €9,90/€69,90, locale italiano e documentazione deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
675 B
Ruby
21 lines
675 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe Billing::Stripe::InvoicePaymentRefs do
|
|
it "legge payment_intent dalla raccolta payments (API Basil+)" do
|
|
pi = double(id: "pi_new")
|
|
payment = double(payment_intent: pi)
|
|
invoice = double(
|
|
payments: double(data: [double(payment: payment)])
|
|
)
|
|
|
|
expect(described_class.payment_intent_id(invoice)).to eq("pi_new")
|
|
expect(described_class.charge_id(invoice)).to be_nil
|
|
end
|
|
|
|
it "non accede a payment_intent top-level sull'invoice" do
|
|
invoice = double(payments: double(data: []))
|
|
expect(invoice).not_to receive(:payment_intent)
|
|
expect(described_class.payment_intent_id(invoice)).to be_nil
|
|
end
|
|
end
|