# Picker API smoke tests

Run against the Docker stack on `http://localhost:8080`.

## Prerequisites

```bash
docker compose up -d
docker compose build app   # after entrypoint changes
```

Ensure host `.env` (or compose) sets `JWT_SECRET` — the app container materialises this into `/var/www/html/.env` at boot.

## Issue tokens

```bash
docker compose exec app php spark picker:issue-tokens 13
```

## Manual checks

| Check | Command |
|-------|---------|
| Profile | `curl -H "Authorization: Bearer <accessToken>" http://localhost:8080/api/v1/picker/me` |
| Refresh | `curl -X POST -H "Content-Type: application/json" -d '{"refreshToken":"..."}' http://localhost:8080/api/v1/auth/refresh` |
| No auth | `curl http://localhost:8080/api/v1/picker/me` → 401 |

## PHPUnit

```bash
php vendor/bin/phpunit --no-coverage tests/unit tests/feature
```

Integration tests (`tests/feature/PickerApiIntegrationTest.php`) require the PHP `pgsql` extension and seeded Postgres data.
