@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user