fix(settings): fix test

Signed-off-by: 諏訪子 <suwako@076.moe>
This commit is contained in:
諏訪子 2025-05-27 18:40:27 +09:00
parent 30fc680086
commit e489713197

View file

@ -792,20 +792,41 @@ class AccountManagerTest extends TestCase {
'@foo@example.com',
'foo@example.com',
true,
json_encode(['username' => 'foo']),
json_encode([
'subject' => 'acct:foo@example.com',
'links' => [
[
'rel' => 'self',
'type' => 'application/activity+json',
'href' => 'https://example.com/users/foo',
],
],
]),
],
'valid response - no at' => [
'foo@example.com',
'foo@example.com',
true,
json_encode(['username' => 'foo']),
json_encode([
'subject' => 'acct:foo@example.com',
'links' => [
[
'rel' => 'self',
'type' => 'application/activity+json',
'href' => 'https://example.com/users/foo',
],
],
]),
],
// failures
'invalid response' => [
'@foo@example.com',
null,
true,
json_encode(['not found']),
json_encode([
'subject' => 'acct:foo@example.com',
'links' => [],
]),
],
'no response' => [
'@foo@example.com',
@ -817,7 +838,9 @@ class AccountManagerTest extends TestCase {
'@foo@example.com',
null,
true,
json_encode(['username' => 'foo@other.example.com']),
json_encode([
'links' => [],
]),
],
];
}