import { describe, it, expect } from 'vitest';
import { buildApp } from '../../src/app';

describe('routes/import', () => {
  it('POST /api/import/scan devuelve 202 o 200', async () => {
    const app = buildApp();
    await app.ready();

    const res = await app.inject({
      method: 'POST',
      url: '/api/import/scan',
      payload: { persist: false },
    });

    expect([200, 202]).toContain(res.statusCode);

    await app.close();
  });
});
