#134 - fill users data for resume #144

Merged
Baakoma merged 34 commits from #134-fill-users-data-for-resume into main 2022-05-18 08:50:41 +02:00
2 changed files with 1 additions and 9 deletions
Showing only changes of commit a6bd4a6cc0 - Show all commits

View File

@@ -14,10 +14,6 @@ class ResumeGenerator
{
public function generate(Resume $resume): string
{
$uid = Str::uuid();
$path = storage_path("${uid}.docx");
$processor = new TemplateProcessor($this->getTemplate());
$processor->setValue("id", $resume->id);
@@ -28,9 +24,7 @@ class ResumeGenerator
$this->fillEducation($processor, $resume);
$this->fillProjects($processor, $resume);
$processor->saveAs($path);
return $path;
return $processor->save();
}
public function getTemplate(): string

View File

@@ -131,8 +131,6 @@ class ResumeTest extends FeatureTestCase
$resume = Resume::factory()->create();
$admin = User::factory()->admin()->create();
$this->withoutExceptionHandling();
$this->actingAs($admin)
->get("/resumes/{$resume->id}")
->assertDownload("resume-{$resume->id}.docx");