Skip to content

Commit

Permalink
Merge pull request #128 from RonasIT/eparusov/fix-resource-generator
Browse files Browse the repository at this point in the history
fix: test generator
  • Loading branch information
DenTray authored Dec 17, 2024
2 parents c17dc1e + a7f7bb0 commit 9e1b452
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions stubs/test.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -208,11 +217,13 @@ public function testSearch(array $filter, string $fixture)
$this->assertEqualsFixture($fixture, $response->json());
}

@if ($withAuth)
public function testSearchNoAuth()
{
$response = $this->json('get', '/{{$entities}}');

$response->assertUnauthorized();
}
@endif
@endif
}

0 comments on commit 9e1b452

Please sign in to comment.