oportunidades 7
tests / ci (push) Waiting to run

This commit is contained in:
2026-10-13 11:40:29 +02:00
parent 20971d523f
commit 287e991486
2902 changed files with 1085456 additions and 25957 deletions
@@ -83,7 +83,7 @@ class OpportunityRealDocumentOperationsTest extends TestCase
$this->get($download)->assertContent($newBytes);
$life = ['etag' => app(OpportunityManagement::class)->etag($o->fresh()), 'version' => 2, 'action' => 'delete', 'confirm' => true, 'reason' => 'Exclusão lógica do recurso apenas em QA'];
$this->postJson($url.'/'.$r['id'].'/lifecycle', $life)->assertOk();
$this->get($download)->assertStatus(423);
$this->get($download)->assertNotFound();
$this->postJson($url.'/'.$r['id'].'/lifecycle', [...$life, 'etag' => app(OpportunityManagement::class)->etag($o->fresh()), 'version' => 3, 'action' => 'restore'])->assertOk();
$this->get($download)->assertContent($newBytes);
$this->assertDatabaseHas('documents', ['id' => $doc, 'deleted_at' => null]);
@@ -122,7 +122,7 @@ class OpportunityRealDocumentOperationsTest extends TestCase
$this->get($url)->assertOk()->assertHeader('Content-Type', 'image/webp')->assertContent($webp);
$this->get(explode('?', $url)[0])->assertForbidden();
Storage::disk('local')->put($d->storage_key, Crypt::encryptString($webp.'tampered QA'));
$this->get($url)->assertConflict();
$this->get($url)->assertNotFound();
Storage::disk('local')->put($d->storage_key, Crypt::encryptString($webp));
}
$this->assertSame(4, DB::table('document_malware_scans')->where('result', 'clean')->count());