import { vi } from 'vitest'

vi.mock('../../lib/prisma', () => ({ prisma: {} }))
vi.mock('../../lib/redis', () => ({
  redis: { on: vi.fn(), get: vi.fn(), set: vi.fn(), del: vi.fn(), quit: vi.fn() },
}))

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

const app = createApp()

describe('public auth disabled e2e smoke', () => {
  it('documents the public renter auth product boundary through real routing and error middleware', async () => {
    const signup = await request(app).post('/api/v1/auth/renter/signup').send({})
    const login = await request(app).post('/api/v1/auth/renter/login').send({})

    expect(signup.status).toBe(403)
    expect(signup.body.error).toBe('renter_signup_disabled')
    expect(login.status).toBe(403)
    expect(login.body.error).toBe('renter_login_disabled')
  })
})
