feat: balance change
This commit is contained in:
@@ -105,6 +105,29 @@ class AdminLoginTest extends TestCase
|
||||
$this->assertAuthenticated('admin');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function google2fa_bound_without_login_verify_skips_code(): void
|
||||
{
|
||||
$google2fa = app(AdminGoogle2fa::class);
|
||||
$secret = $google2fa->generateSecret();
|
||||
|
||||
Admin::query()->create([
|
||||
'username' => 'admin',
|
||||
'password' => 'admin123',
|
||||
'status' => 1,
|
||||
'google_auth_open' => 0,
|
||||
'google_secret' => $secret,
|
||||
]);
|
||||
|
||||
$this->post('/admin/login', [
|
||||
'username' => 'admin',
|
||||
'password' => 'admin123',
|
||||
])->assertOk()
|
||||
->assertJson(['code' => 0]);
|
||||
|
||||
$this->assertAuthenticated('admin');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function login_is_rate_limited_after_failures(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user