import { describe, expect, it } from 'vitest'
import request from 'supertest'
import { createApp } from '../../app'

const app = createApp()

describe('auth onboarding integration', () => {
  it('rejects incomplete company onboarding before database writes are attempted', async () => {
    const res = await request(app).post('/api/v1/auth/company/signup').send({
      email: 'owner@example.com',
      companyName: 'Atlas Cars',
    })

    expect(res.status).toBe(400)
    expect(res.body.error).toBe('validation_error')
  })
})
