feat(superadmin): migrate internal docs from docusaurus to guava kb
This commit is contained in:
@@ -74,4 +74,27 @@ class UserRoleAccessTest extends TestCase
|
||||
$response2 = $this->actingAs($user)->get('/event-admin/dashboard');
|
||||
$response2->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_super_admin_can_access_super_admin_docs_panel(): void
|
||||
{
|
||||
$user = User::factory()->create(['role' => 'super_admin']);
|
||||
|
||||
$response = $this->actingAs($user, 'super_admin')->get('/super-admin/docs');
|
||||
|
||||
$response->assertRedirect();
|
||||
|
||||
$redirectPath = parse_url((string) $response->headers->get('Location'), PHP_URL_PATH);
|
||||
|
||||
$this->assertNotSame('/super-admin/docs/login', $redirectPath);
|
||||
$this->assertStringStartsWith('/super-admin/docs', (string) $redirectPath);
|
||||
}
|
||||
|
||||
public function test_non_super_admin_cannot_access_super_admin_docs_panel(): void
|
||||
{
|
||||
$user = User::factory()->create(['role' => 'tenant_admin']);
|
||||
|
||||
$response = $this->actingAs($user, 'super_admin')->get('/super-admin/docs');
|
||||
|
||||
$response->assertForbidden();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user