Open Jigsaw5279 opened 1 year ago
When asserting that an action responds with a specific message, the test case fails with the following error
Failed asserting that Laravel\Nova\Actions\ActionResponse Object #1410 ( 'danger' => null 'deleted' => null 'download' => null 'message' => 'Registrierung bestätigt' 'name' => null 'openInNewTab' => null 'redirect' => null 'visit' => null 'modal' => null 'data' => Array &0 () ) is of type array and matches the "message" Action response. /var/www/html/vendor/joshgaber/novaunit/src/Actions/MockActionResponse.php:33 /var/www/html/vendor/joshgaber/novaunit/src/Actions/MockActionResponse.php:47 /var/www/html/tests/Feature/QuickConfirmActionTest.php:154 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:174
Here's the excerpt from the test case
self::novaAction(QuickConfirmAction::class) ->handle([], $registration) ->assertMessage('Registrierung bestätigt');
Version:
name : joshgaber/novaunit descrip. : Unit testing suite for Laravel Nova, built to extend PHPUnit keywords : joshgaber, laravel, nova, novaunit versions : * 3.1.0
I'm having the same issue. As a workaround for now I'm using:
$response = $action->handle([], [$model]); $response->assertMessageContains('my message here');
I think PR #59 is related to this
When asserting that an action responds with a specific message, the test case fails with the following error
Here's the excerpt from the test case
Version: