Merge branch 'main' into collaudo
Porta su collaudo i prezzi di lancio, la pagina Funzionalità e i badge store.
This commit is contained in:
@@ -10,7 +10,7 @@ RSpec.describe Billing::PaymentDescription do
|
||||
lines: double(data: [])
|
||||
)
|
||||
|
||||
expect(described_class.for_stripe_invoice(invoice)).to eq("Premium Light — €5/mese")
|
||||
expect(described_class.for_stripe_invoice(invoice)).to eq("Premium Light — €7,90/mese")
|
||||
end
|
||||
|
||||
it "ignora descrizioni di test nel pagamento salvato" do
|
||||
@@ -23,6 +23,6 @@ RSpec.describe Billing::PaymentDescription do
|
||||
club: Club.create!(name: "C", sport: "volleyball", primary_color: "#e53935", secondary_color: "#ffffff")
|
||||
)
|
||||
|
||||
expect(payment.display_description).to eq("Premium Light — €40/anno")
|
||||
expect(payment.display_description).to eq("Premium Light — €59/anno")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -23,6 +23,15 @@ RSpec.describe Billing::Stripe::PriceCatalog do
|
||||
expect { described_class.normalize_interval("weekly") }.to raise_error(ArgumentError)
|
||||
end
|
||||
|
||||
it "etichetta il prezzo lancio annuale e il mensile" do
|
||||
expect(described_class.label(plan_slug: "premium_light", interval: "yearly")).to eq("€59/anno")
|
||||
expect(described_class.label(plan_slug: "premium_light", interval: "monthly")).to eq("€7,90/mese")
|
||||
expect(described_class.list_label(plan_slug: "premium_light", interval: "yearly")).to eq("€79/anno")
|
||||
expect(described_class.equivalent_monthly_label(plan_slug: "premium_light")).to eq("€4,92/mese")
|
||||
expect(described_class.label(plan_slug: "premium_full", interval: "yearly")).to eq("€199/anno")
|
||||
expect(described_class.label(plan_slug: "premium_full", interval: "monthly")).to eq("€24,90/mese")
|
||||
end
|
||||
|
||||
it "elenca intervalli configurati" do
|
||||
expect(described_class.available_intervals(plan_slug: "premium_light")).to eq(%w[monthly yearly])
|
||||
end
|
||||
|
||||
@@ -38,6 +38,6 @@ RSpec.describe Billing::Stripe::RecordPayment do
|
||||
expect(payment.club).to eq(club)
|
||||
expect(payment.amount_cents).to eq(4000)
|
||||
expect(payment.stripe_invoice_id).to eq("in_test_1")
|
||||
expect(payment.description).to eq("Premium Light — €40/anno")
|
||||
expect(payment.description).to eq("Premium Light — €59/anno")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user