Files
upstream-krayin/tests/Feature/AuthenticationTest.php
upstream-mirror 135ffdb085
Some checks failed
Admin | Playwright Tests / Admin | Playwright Tests | Shard 1 Of 6 (push) Failing after 37s
Admin | Playwright Tests / Admin | Playwright Tests | Shard 2 Of 6 (push) Failing after 7s
Admin | Playwright Tests / Admin | Playwright Tests | Shard 4 Of 6 (push) Failing after 7s
Admin | Playwright Tests / Admin | Playwright Tests | Shard 6 Of 6 (push) Failing after 6s
Linting Tests / PHP 8.3 test on ubuntu-latest (push) Failing after 5s
CI / PHP 8.3 test on ubuntu-latest (push) Failing after 6s
Skills Consistency / validate-skills (push) Successful in 10s
Admin | Playwright Tests / Admin | Playwright Tests | Shard 3 Of 6 (push) Failing after 7s
Admin | Playwright Tests / Admin | Playwright Tests | Shard 5 Of 6 (push) Failing after 6s
snapshot of https://github.com/krayin/laravel-crm.git (2.2, 2026-09-18; blobs > 131072B omitted)
2026-09-18 04:37:41 +05:00

29 lines
697 B
PHP

<?php
it('can see the admin login page', function () {
test()->get(route('admin.session.create'))
->assertOK();
});
it('can see the dashboard page after login', function () {
$admin = getDefaultAdmin();
test()->actingAs($admin)
->get(route('admin.dashboard.index'))
->assertOK();
expect(auth()->guard('user')->user()->name)->toBe($admin->name);
});
it('can logout from the admin panel', function () {
$admin = getDefaultAdmin();
test()->actingAs($admin)
->delete(route('admin.session.destroy'), [
'_token' => csrf_token(),
])
->assertStatus(302);
expect(auth()->guard('user')->user())->toBeNull();
});