From 5db3adc3e95129c2e61955671993e777264172fa Mon Sep 17 00:00:00 2001 From: eparusov Date: Mon, 16 Dec 2024 15:39:05 +0300 Subject: [PATCH 1/3] fix: test generator --- stubs/test.blade.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stubs/test.blade.php b/stubs/test.blade.php index 2562121..ebdc4c3 100644 --- a/stubs/test.blade.php +++ b/stubs/test.blade.php @@ -178,6 +178,14 @@ public function testGetNotExists() $response->assertNotFound(); } +@if ($withAuth) + public function testGetNoAuth() + { + $response = $this->json('get', '/{{$entities}}/1'); + + $response->assertUnauthorized(); + } +@endif public static function getSearchFilters(): array { return [ From c11e802531c956befa01c8e686598910492ca139 Mon Sep 17 00:00:00 2001 From: eparusov Date: Mon, 16 Dec 2024 15:44:19 +0300 Subject: [PATCH 2/3] fix: test generator --- stubs/test.blade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stubs/test.blade.php b/stubs/test.blade.php index ebdc4c3..c299c01 100644 --- a/stubs/test.blade.php +++ b/stubs/test.blade.php @@ -177,8 +177,8 @@ public function testGetNotExists() $response->assertNotFound(); } - @if ($withAuth) + public function testGetNoAuth() { $response = $this->json('get', '/{{$entities}}/1'); @@ -186,6 +186,7 @@ public function testGetNoAuth() $response->assertUnauthorized(); } @endif + public static function getSearchFilters(): array { return [ From a7f7bb047405e966e00b600f89f71c101f39efaf Mon Sep 17 00:00:00 2001 From: eparusov Date: Mon, 16 Dec 2024 16:00:05 +0300 Subject: [PATCH 3/3] fix: test generator --- stubs/test.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stubs/test.blade.php b/stubs/test.blade.php index c299c01..068cc57 100644 --- a/stubs/test.blade.php +++ b/stubs/test.blade.php @@ -217,6 +217,7 @@ public function testSearch(array $filter, string $fixture) $this->assertEqualsFixture($fixture, $response->json()); } +@if ($withAuth) public function testSearchNoAuth() { $response = $this->json('get', '/{{$entities}}'); @@ -224,4 +225,5 @@ public function testSearchNoAuth() $response->assertUnauthorized(); } @endif +@endif }