Skip to content

Commit e489713

Browse files
fix(settings): fix test
Signed-off-by: 諏訪子 <[email protected]>
1 parent 30fc680 commit e489713

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

tests/lib/Accounts/AccountManagerTest.php

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -792,20 +792,41 @@ public static function dataSanitizeFediverseServer(): array {
792792
793793
794794
true,
795-
json_encode(['username' => 'foo']),
795+
json_encode([
796+
'subject' => 'acct:[email protected]',
797+
'links' => [
798+
[
799+
'rel' => 'self',
800+
'type' => 'application/activity+json',
801+
'href' => 'https://example.com/users/foo',
802+
],
803+
],
804+
]),
796805
],
797806
'valid response - no at' => [
798807
799808
800809
true,
801-
json_encode(['username' => 'foo']),
810+
json_encode([
811+
'subject' => 'acct:[email protected]',
812+
'links' => [
813+
[
814+
'rel' => 'self',
815+
'type' => 'application/activity+json',
816+
'href' => 'https://example.com/users/foo',
817+
],
818+
],
819+
]),
802820
],
803821
// failures
804822
'invalid response' => [
805823
806824
null,
807825
true,
808-
json_encode(['not found']),
826+
json_encode([
827+
'subject' => 'acct:[email protected]',
828+
'links' => [],
829+
]),
809830
],
810831
'no response' => [
811832
@@ -817,7 +838,9 @@ public static function dataSanitizeFediverseServer(): array {
817838
818839
null,
819840
true,
820-
json_encode(['username' => '[email protected]']),
841+
json_encode([
842+
'links' => [],
843+
]),
821844
],
822845
];
823846
}

0 commit comments

Comments
 (0)