- 00-Auth/02 Login : trailing whitespace - 03-Clients/04 Create : test data variant (Martin2, siret/phone différents) pour éviter le conflit unique sur les exécutions successives - 05-Invoices/04 Create : numéro F-2026-0047, dueDate au 2026-04-01 (passée → déclenche l'envoi immédiat des RelanceTasks BullMQ pour tester le pipeline outbound) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
48 lines
885 B
Plaintext
48 lines
885 B
Plaintext
meta {
|
|
name: 04 Create
|
|
type: http
|
|
seq: 4
|
|
}
|
|
|
|
post {
|
|
url: {{baseUrl}}/api/v1/clients
|
|
body: json
|
|
auth: inherit
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"name": "Boulangerie2 Martin SARL",
|
|
"email": "compta@martin2.fr",
|
|
"phone": "06 12 34 56 72",
|
|
"siret": "12345678901232",
|
|
"notes": "Bon payeur historique2"
|
|
}
|
|
|
|
}
|
|
|
|
script:post-response {
|
|
if (res.getStatus() === 201) {
|
|
bru.setEnvVar("clientId", res.getBody().data.id);
|
|
}
|
|
}
|
|
|
|
tests {
|
|
test("201 Created", function () {
|
|
expect(res.getStatus()).to.equal(201);
|
|
});
|
|
test("clientId saved to env", function () {
|
|
expect(bru.getEnvVar("clientId")).to.not.be.empty;
|
|
});
|
|
}
|
|
|
|
docs {
|
|
POST /api/v1/clients
|
|
|
|
Création manuelle. Email **requis** (pivot produit). SIRET = 14 chiffres
|
|
exactement si fourni.
|
|
|
|
Capture `clientId` dans l'env pour les requêtes suivantes (détail,
|
|
update, création de facture).
|
|
}
|