require "rails_helper"

RSpec.describe Billing::Invoice do
  let(:club) { Club.create!(name: "Inv Club", sport: "volleyball", primary_color: "#e53935", secondary_color: "#ffffff") }

  it "non mostra Aruba nel numero in UI" do
    invoice = club.billing_invoices.build(
      number: "ARUBA-RUNNER/2026",
      issued_on: Date.current,
      amount_cents: 5000,
      currency: "eur",
      status: "issued",
      source: "aruba"
    )

    expect(invoice.display_number).to eq("RUNNER/2026")
    expect(invoice.display_number).not_to match(/aruba/i)
  end
end
