feat: phase 2 — master data (products, customers, drivers) via InsForge-backed Filament pages
This commit is contained in:
@@ -59,14 +59,16 @@ class AuthenticationTest extends TestCase
|
||||
public function test_mirror_profile_is_created_when_missing(): void
|
||||
{
|
||||
InsForgeFake::fakeLoginSuccess($this->adminProfile());
|
||||
unset(InsForgeFake::$profiles['admin@beraspro.test']);
|
||||
InsForgeFake::reset();
|
||||
|
||||
Livewire::test(Login::class)
|
||||
->fillForm(['email' => 'admin@beraspro.test', 'password' => 'secret'])
|
||||
->call('authenticate');
|
||||
|
||||
$this->assertArrayHasKey('admin@beraspro.test', InsForgeFake::$profiles);
|
||||
$this->assertSame('operator', InsForgeFake::$profiles['admin@beraspro.test']['role']);
|
||||
$profiles = array_filter(InsForgeFake::$store['users'] ?? [], fn (array $row): bool => $row['email'] === 'admin@beraspro.test');
|
||||
|
||||
$this->assertCount(1, $profiles);
|
||||
$this->assertSame('operator', reset($profiles)['role']);
|
||||
}
|
||||
|
||||
public function test_invalid_credentials_do_not_authenticate(): void
|
||||
|
||||
Reference in New Issue
Block a user