mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(settings): fix test
Signed-off-by: 諏訪子 <suwako@076.moe>
This commit is contained in:
parent
30fc680086
commit
e489713197
1 changed files with 27 additions and 4 deletions
|
|
@ -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' => [],
|
||||
]),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue