diff --git a/stubs/test.blade.php b/stubs/test.blade.php index 2562121a..068cc570 100644 --- a/stubs/test.blade.php +++ b/stubs/test.blade.php @@ -177,6 +177,15 @@ public function testGetNotExists() $response->assertNotFound(); } +@if ($withAuth) + + public function testGetNoAuth() + { + $response = $this->json('get', '/{{$entities}}/1'); + + $response->assertUnauthorized(); + } +@endif public static function getSearchFilters(): array { @@ -208,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}}'); @@ -215,4 +225,5 @@ public function testSearchNoAuth() $response->assertUnauthorized(); } @endif +@endif }