fix: block ready bid exports once a winner is published

This commit is contained in:
2026-09-06 14:57:53 +03:00
parent 2353170c40
commit 528933aa1b
5 changed files with 28 additions and 0 deletions
+7
View File
@@ -14,3 +14,10 @@ test('cancelled and completed tenders do not regain readiness merely through a f
for(const durum of ['İptal Edildi','Sonuçlandı','Sözleşme imzalandı'])
assert.match(preparationDeadlineProblem({...tender,durum},new Date('2026-09-01')),/iptal edilmiş veya sonuçlanmış/);
});
test('published winner blocks readiness even when the source status and date still appear open',()=>{
const now=new Date('2026-09-01');
for(const durum of ['Açık','',undefined])
assert.match(preparationDeadlineProblem({...tender,durum,kazananFirma:'QA Laboratuvar'},now),/kazananı açıklanmış/);
assert.equal(preparationDeadlineProblem({...tender,kazananFirma:''},now),null);
});