Skip to content

Commit 9e1b452

Browse files
authored
Merge pull request #128 from RonasIT/eparusov/fix-resource-generator
fix: test generator
2 parents c17dc1e + a7f7bb0 commit 9e1b452

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

stubs/test.blade.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,15 @@ public function testGetNotExists()
177177

178178
$response->assertNotFound();
179179
}
180+
@if ($withAuth)
181+
182+
public function testGetNoAuth()
183+
{
184+
$response = $this->json('get', '/{{$entities}}/1');
185+
186+
$response->assertUnauthorized();
187+
}
188+
@endif
180189

181190
public static function getSearchFilters(): array
182191
{
@@ -208,11 +217,13 @@ public function testSearch(array $filter, string $fixture)
208217
$this->assertEqualsFixture($fixture, $response->json());
209218
}
210219

220+
@if ($withAuth)
211221
public function testSearchNoAuth()
212222
{
213223
$response = $this->json('get', '/{{$entities}}');
214224

215225
$response->assertUnauthorized();
216226
}
217227
@endif
228+
@endif
218229
}

0 commit comments

Comments
 (0)