PMCORE-1596 The files attached in the cases notes needs to send in the email notification.

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-06-11 11:49:54 -04:00
parent 3ddf8abc7c
commit 536c3588da
6 changed files with 204 additions and 16 deletions

View File

@@ -1,7 +1,9 @@
<?php
namespace Tests\unit\workflow\engine\src\ProcessMaker\Model;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use ProcessMaker\Model\AppNotes;
use ProcessMaker\Model\Documents;
use Tests\TestCase;
@@ -26,4 +28,22 @@ class DocumentsTest extends TestCase
$res = $doc->getAppFiles($appDoc->APP_UID, Documents::DOC_TYPE_CASE_NOTE);
$this->assertNotEmpty($res);
}
/**
* This test verify if exists attachment files.
* @test
* @covers Documents::getAttachedFilesFromTheCaseNote
*/
public function it_should_test_get_attached_files_from_the_casenote()
{
$appNote = factory(AppNotes::class)->create();
$appDocument = factory(Documents::class)->create([
'DOC_ID' => $appNote->NOTE_ID
]);
$appUid = $appDocument->APP_UID;
$result = Documents::getAttachedFilesFromTheCaseNote($appUid);
$this->assertNotEmpty($result);
}
}