fix(settings): fix test

Signed-off-by: 諏訪子 <suwako@076.moe>
pull/53843/head
諏訪子 2025-05-27 18:40:27 +07:00 committed by backportbot[bot]
parent 645b989619
commit df78886ae7
1 changed files with 27 additions and 4 deletions

@ -792,20 +792,41 @@ class AccountManagerTest extends TestCase {
'@foo@example.com', '@foo@example.com',
'foo@example.com', 'foo@example.com',
true, 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' => [ 'valid response - no at' => [
'foo@example.com', 'foo@example.com',
'foo@example.com', 'foo@example.com',
true, 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 // failures
'invalid response' => [ 'invalid response' => [
'@foo@example.com', '@foo@example.com',
null, null,
true, true,
json_encode(['not found']), json_encode([
'subject' => 'acct:foo@example.com',
'links' => [],
]),
], ],
'no response' => [ 'no response' => [
'@foo@example.com', '@foo@example.com',
@ -817,7 +838,9 @@ class AccountManagerTest extends TestCase {
'@foo@example.com', '@foo@example.com',
null, null,
true, true,
json_encode(['username' => 'foo@other.example.com']), json_encode([
'links' => [],
]),
], ],
]; ];
} }