Twice now a mock written from the upstream source passed while a real server disagreed — the system-log timestamps and the `/subscriptions/steps` shape — and `frequency_id` and several empty-string fields were wrong the same way. Reading the source harder was not going to find the next one. `tests/fixtures/*.json` hold the *shapes* of real responses: every key, with its JSON type, and no values at all. `real_shapes.rs` decodes each one and checks that a decode plus re-serialise loses no key, so a field the models silently drop now fails a test. It also refuses a fixture holding any real value, and refuses a fixture that no test reads. `seed_sample_data.rs` fills a disposable instance with one row of each kind and `capture_shapes.rs` captures the shapes back out with GET requests only, so the set can be refreshed when a divergence turns up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
45 lines
984 B
JSON
45 lines
984 B
JSON
{
|
|
"data": [
|
|
{
|
|
"archived_at": 0,
|
|
"created_at": 0,
|
|
"custom_value1": "",
|
|
"custom_value2": "",
|
|
"custom_value3": "",
|
|
"custom_value4": "",
|
|
"email": "",
|
|
"email_verified_at": 0,
|
|
"first_name": "",
|
|
"google_2fa_secret": false,
|
|
"has_password": false,
|
|
"id": "",
|
|
"is_deleted": false,
|
|
"language_id": "",
|
|
"last_confirmed_email_address": "",
|
|
"last_login": 0,
|
|
"last_name": "",
|
|
"oauth_provider_id": "",
|
|
"oauth_user_token": "",
|
|
"passkey_count": 0,
|
|
"passkey_enabled": false,
|
|
"phone": "",
|
|
"referral_code": "",
|
|
"referral_meta": {
|
|
"enterprise": 0,
|
|
"free": 0,
|
|
"pro": 0
|
|
},
|
|
"settings": {
|
|
"calendar_connection": {
|
|
"email": "",
|
|
"status": ""
|
|
}
|
|
},
|
|
"signature": "",
|
|
"updated_at": 0,
|
|
"user_logged_in_notification": false,
|
|
"verified_phone_number": false
|
|
}
|
|
]
|
|
}
|