import { describe, expect, it } from 'vitest'
import { companySignupSchema } from '../../modules/auth/auth.company.schemas'
import { createSchema as reservationCreateSchema } from '../../modules/reservations/reservation.schemas'
import { checkoutSchema as subscriptionCheckoutSchema } from '../../modules/subscriptions/subscription.schemas'

describe('schema boundary integration markers', () => {
  it('keeps public commercial payloads constrained before database-backed flows execute', () => {
    expect(companySignupSchema.safeParse({}).success).toBe(false)
    expect(reservationCreateSchema.safeParse({ vehicleId: 'bad', customerId: 'bad', startDate: 'bad', endDate: 'bad' }).success).toBe(false)
    expect(subscriptionCheckoutSchema.safeParse({ plan: 'PRO', billingPeriod: 'MONTHLY', currency: 'MAD', provider: 'PAYPAL', successUrl: 'https://ok.example.test', failureUrl: 'https://fail.example.test' }).success).toBe(true)
  })
})
