Mostra il piano attivo dopo il bonifico e allinea il flusso società.
Dopo la conferma admin la card restava su «Paga con bonifico»; la società parte da Free, l'owner è staff trasmissione e le mail non bloccano se manca SMTP. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -26,7 +26,7 @@ RSpec.describe Billing::RequestBankTransfer do
|
||||
)
|
||||
end
|
||||
|
||||
it "crea un ordine a listino e invia le istruzioni" do
|
||||
it "crea l'ordine a listino e invia le istruzioni" do
|
||||
expect {
|
||||
described_class.call(club: club, user: user, plan_slug: "premium_light", interval: "yearly")
|
||||
}.to change { club.billing_transfer_orders.count }.by(1)
|
||||
@@ -41,6 +41,18 @@ RSpec.describe Billing::RequestBankTransfer do
|
||||
expect(club.reload.subscription.plan.slug).to eq("free")
|
||||
end
|
||||
|
||||
it "crea comunque l'ordine se in produzione manca SMTP" do
|
||||
allow(MatchLiveTv).to receive(:smtp_configured?).and_return(false)
|
||||
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new("production"))
|
||||
|
||||
expect {
|
||||
described_class.call(club: club, user: user, plan_slug: "premium_light", interval: "yearly")
|
||||
}.to change { club.billing_transfer_orders.count }.by(1)
|
||||
.and change { ActionMailer::Base.deliveries.size }.by(0)
|
||||
|
||||
expect(club.billing_transfer_orders.last).to be_awaiting_payment
|
||||
end
|
||||
|
||||
it "usa l'importo concordato se presente" do
|
||||
Billing::SetClubQuote.upsert(
|
||||
club: club, plan_slug: "premium_full", interval: "yearly",
|
||||
|
||||
Reference in New Issue
Block a user