fix dashboard and apis
PHP Tests / php-tests (push) Failing after 9m1s

This commit is contained in:
Nyan Lin Paing
2026-08-16 23:50:39 +07:00
parent 60413bdebf
commit 8d74ac74cd
26 changed files with 638 additions and 55 deletions
@@ -78,6 +78,16 @@ test('filters routes by company, from, and to', function () {
->assertJsonPath('data.0.id', $matching->id);
});
test('paginates routes', function () {
EvRoute::factory()->count(20)->create(['is_active' => true]);
$this->withHeader('Authorization', "Bearer {$this->token}")
->getJson('/api/v1/routes')
->assertSuccessful()
->assertJsonCount(15, 'data')
->assertJsonPath('meta.total', 20);
});
test('shows a single active route', function () {
$route = EvRoute::factory()->create(['is_active' => true]);