refactor: update menu code references from 'onticket.adminapp.tickets' to 'adminapp.tickets'
This commit is contained in:
@@ -18,9 +18,9 @@ class TicketMenuAccessTest extends TestCase
|
||||
public static function menuAssignments(): array
|
||||
{
|
||||
return [
|
||||
'OnTicket' => ['onticket.adminapp.tickets', 'current', true],
|
||||
'old code' => ['adminapp.tickets', 'current', false],
|
||||
'another tenant' => ['onticket.adminapp.tickets', 'other', false],
|
||||
'new code' => ['onticket.adminapp.tickets', 'current', false],
|
||||
'old code' => ['adminapp.tickets', 'current', true],
|
||||
'another tenant' => ['adminapp.tickets', 'other', false],
|
||||
'unrelated menu' => ['adminapp.ventas', 'current', false],
|
||||
];
|
||||
}
|
||||
@@ -53,7 +53,7 @@ class TicketMenuAccessTest extends TestCase
|
||||
}
|
||||
|
||||
try {
|
||||
$response = (new EnsureTenantHasMenu)->handle($request, fn () => response('allowed'), 'onticket.adminapp.tickets');
|
||||
$response = (new EnsureTenantHasMenu)->handle($request, fn () => response('allowed'), 'adminapp.tickets');
|
||||
$this->assertSame('allowed', $response->getContent());
|
||||
} catch (HttpException $exception) {
|
||||
$this->assertSame(404, $exception->getStatusCode());
|
||||
@@ -70,7 +70,7 @@ class TicketMenuAccessTest extends TestCase
|
||||
] as $name) {
|
||||
$route = Route::getRoutes()->getByName($name);
|
||||
$this->assertNotNull($route);
|
||||
$this->assertContains('tenant.menu:onticket.adminapp.tickets', $route->gatherMiddleware());
|
||||
$this->assertContains('tenant.menu:adminapp.tickets', $route->gatherMiddleware());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user