Billing Stripe, link regia mobile e staff solo trasmissione.
Aggiunge fatturazione club, pagina regia condivisibile senza account, roster squadre e rimuove la modalità controller dall'app (v1.1.0). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
29
backend/spec/models/club_billing_profile_spec.rb
Normal file
29
backend/spec/models/club_billing_profile_spec.rb
Normal file
@@ -0,0 +1,29 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe ClubBillingProfile do
|
||||
let(:club) do
|
||||
Club.create!(
|
||||
name: "Test Club",
|
||||
sport: "volleyball",
|
||||
primary_color: "#e53935",
|
||||
secondary_color: "#ffffff",
|
||||
billing_legal_name: "ASD Test",
|
||||
billing_email: "billing@test.it",
|
||||
billing_address_line: "Via Roma 1",
|
||||
billing_city: "Milano",
|
||||
billing_postal_code: "20100",
|
||||
billing_vat_number: "12345678901",
|
||||
billing_recipient_code: "ABCDEFG"
|
||||
)
|
||||
end
|
||||
|
||||
it "is complete with required fields" do
|
||||
expect(club.billing_profile_complete?).to be true
|
||||
end
|
||||
|
||||
it "requires SDI or PEC" do
|
||||
club.billing_recipient_code = nil
|
||||
club.billing_pec = nil
|
||||
expect(club.billing_profile_complete?).to be false
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user