it('can save', function () {
Storage::disk('fonts')->put($this->name, file_get_contents('storage/app/tests/' . $this->name));
Storage::disk('thumbnails')->put($this->thumbnail, file_get_contents('storage/app/tests/' . $this->thumbnail));
$record = $this->modelClass::factory()->create(['file' => $this->name]);
expect(Storage::disk('fonts')->path($record->file))->toBeReadableFile();
expect(Storage::disk('thumbnails')->path($record->thumbnail))->toBeReadableFile();
livewire($this->indexClass)
->mountTableAction(EditAction::class, $record)
->assertTableActionDataSet([
'name' => $record->name,
'file' => $record->file
])->callTableAction(EditAction::class, $record, data: ['name'=>$name = fake()->word(), 'file'=>$this->newFile])
->assertHasNoTableActionErrors();
it('can save', function () {
Storage::disk('fonts')->put($this->name, file_get_contents('storage/app/tests/' . $this->name));
Storage::disk('thumbnails')->put($this->thumbnail, file_get_contents('storage/app/tests/' . $this->thumbnail));
$record = $this->modelClass::factory()->create(['file' => $this->name]);
expect(Storage::disk('fonts')->path($record->file))->toBeReadableFile();
expect(Storage::disk('thumbnails')->path($record->thumbnail))->toBeReadableFile();
livewire($this->indexClass)
->mountTableAction(EditAction::class, $record)
->assertTableActionDataSet([
'name' => $record->name,
'file' => $record->file
])->callTableAction(EditAction::class, $record, data: ['name'=>$name = fake()->word(), 'file'=>$this->newFile])
->assertHasNoTableActionErrors();