diff --git a/tests/TurboFrameTest.php b/tests/TurboFrameTest.php index 954f2e3..54e9578 100644 --- a/tests/TurboFrameTest.php +++ b/tests/TurboFrameTest.php @@ -10,14 +10,8 @@ }); it('throws missing partial exception', function () { - $this->assertThrows( - function () { - response()->turboFrame()->toResponse(request()); - }, - TurboStreamResponseFailedException::class, - 'Missing partial: non "remove" Turbo Streams need a partial.' - ); -}); + response()->turboFrame()->toResponse(request()); +})->throws(TurboStreamResponseFailedException::class, 'Missing partial: non "remove" Turbo Streams need a partial.'); it('generates correct generic turbo frame', function () { $expectedOutput = File::get('tests/responses/turbo-frame/turbo-frame-generic.html'); diff --git a/tests/TurboStreamTest.php b/tests/TurboStreamTest.php index ce95cd2..cde6ded 100644 --- a/tests/TurboStreamTest.php +++ b/tests/TurboStreamTest.php @@ -10,14 +10,9 @@ }); it('throws missing partial exception', function () { - $this->assertThrows( - function () { - response()->turboStream()->toResponse(request()); - }, - TurboStreamResponseFailedException::class, - 'Missing partial: non "remove" Turbo Streams need a partial.' - ); -}); + response()->turboStream()->toResponse(request()); +}) + ->throws(TurboStreamResponseFailedException::class, 'Missing partial: non "remove" Turbo Streams need a partial.'); it('generates correct turbo stream - append', function () { $expectedOutput = File::get('tests/responses/turbo-stream/append.html');