normalize health portfolio identifiers

This commit is contained in:
2026-09-06 18:07:55 +03:00
parent 231c372411
commit 6b3b446e49
3 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ test('health portfolio writes reject malformed records before persistence',async
const base={company:'QA sağlık',scrapedCapabilities:{healthPortfolio:[{id:'hp-1',group:'Mikroskop',kind:'device',utsStatus:'declared'}]}};
assert.equal((await request('/api/me/data','PUT',{anahtar:'firma_profil',deger:base,revision})).status,200);
const next=(await request('/api/me/data')).data.revisions.firma_profil;
for (const healthPortfolio of [[{id:'hp-1'},{id:'hp-1'}],[{id:'hp-1',kind:'other'}],[{id:'hp-1',model:'x'.repeat(1001)}]]) {
for (const healthPortfolio of [[{id:'hp-1'},{id:'hp-1'}],[{id:'hp-1'},{id:' hp-1 '}],[{id:'hp-1',kind:'other'}],[{id:'hp-1',model:'x'.repeat(1001)}]]) {
const response=await request('/api/me/data','PUT',{anahtar:'firma_profil',deger:{...base,scrapedCapabilities:{healthPortfolio}},revision:next});
assert.equal(response.status,400);
}