diff --git a/tests/Tests/KanbanBoardTest.php b/tests/Tests/KanbanBoardTest.php index 5760961..73ebe6e 100644 --- a/tests/Tests/KanbanBoardTest.php +++ b/tests/Tests/KanbanBoardTest.php @@ -20,6 +20,21 @@ ->toContainAsFile('class TestBoard extends KanbanBoard'); }); +it('can make kanban board from custom stub', function () { + File::delete($this->app->basePath('app/Filament/Pages/TestBoard.php')); + File::delete($this->app->basePath('stubs/filament-kanban/board.stub')); + File::ensureDirectoryExists($this->app->basePath('/stubs/filament-kanban/')); + File::put($this->app->basePath('/stubs/filament-kanban/board.stub'), 'custom stub'); + + $pagesPath = $this->app->basePath('app/Filament/Pages'); + + $this->artisan('make:kanban TestBoard')->assertExitCode(0); + + expect($pagesPath . '/TestBoard.php') + ->toBeFile() + ->toContainAsFile('custom stub'); +}); + it('loads statuses', function () { $statuses = TaskStatus::statuses() ->pluck('title')