update api key

This commit is contained in:
2026-04-02 14:41:31 +08:00
parent 3a2b175028
commit d28a014209
4 changed files with 14 additions and 5 deletions
+3 -2
View File
@@ -102,7 +102,7 @@ class ApiKeyTest extends TestCase
});
}
public function test_find_by_plain_key_excludes_disabled_key(): void
public function test_find_by_plain_key_returns_disabled_key(): void
{
$this->runInCoroutine(function (): void {
$user = $this->createTestUser();
@@ -112,7 +112,8 @@ class ApiKeyTest extends TestCase
$result['api_key']->save();
$found = ApiKey::findByPlainKey($result['plain_key']);
$this->assertNull($found);
$this->assertNotNull($found);
$this->assertFalse($found->enabled);
});
}