Fix users queries phone -> number
This commit is contained in:
parent
a2778e410f
commit
734561c6b6
2 changed files with 7 additions and 7 deletions
|
@ -553,8 +553,8 @@ trait GraphQLBase
|
||||||
}
|
}
|
||||||
}';
|
}';
|
||||||
case self::$GET_USERS:
|
case self::$GET_USERS:
|
||||||
return 'query listUsers($search: String, $limit: Int, $offset: Int, $cursor: String, $cursorDirection: String, $orderType: String) {
|
return 'query listUsers($search: String, $queries: [String!]) {
|
||||||
usersList(search: $search, limit: $limit, offset: $offset, cursor: $cursor, cursorDirection: $cursorDirection, orderType: $orderType) {
|
usersList(search: $search, queries: $queries) {
|
||||||
total
|
total
|
||||||
users {
|
users {
|
||||||
_id
|
_id
|
||||||
|
@ -619,8 +619,8 @@ trait GraphQLBase
|
||||||
}
|
}
|
||||||
}';
|
}';
|
||||||
case self::$UPDATE_USER_PHONE:
|
case self::$UPDATE_USER_PHONE:
|
||||||
return 'mutation updateUserPhone($userId: String!, $phone: String!){
|
return 'mutation updateUserPhone($userId: String!, $number: String!){
|
||||||
usersUpdatePhone(userId: $userId, phone: $phone) {
|
usersUpdatePhone(userId: $userId, number: $number) {
|
||||||
name
|
name
|
||||||
phone
|
phone
|
||||||
email
|
email
|
||||||
|
|
|
@ -128,7 +128,7 @@ class GraphQLUsersTest extends Scope
|
||||||
|
|
||||||
$this->assertIsArray($user['body']['data']);
|
$this->assertIsArray($user['body']['data']);
|
||||||
$this->assertArrayNotHasKey('errors', $user['body']);
|
$this->assertArrayNotHasKey('errors', $user['body']);
|
||||||
$this->assertIsArray($user['body']['data']['usersGetSessions']);
|
$this->assertIsArray($user['body']['data']['usersListSessions']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetUserMemberships()
|
public function testGetUserMemberships()
|
||||||
|
@ -317,7 +317,7 @@ class GraphQLUsersTest extends Scope
|
||||||
'query' => $query,
|
'query' => $query,
|
||||||
'variables' => [
|
'variables' => [
|
||||||
'userId' => $this->getUser()['$id'],
|
'userId' => $this->getUser()['$id'],
|
||||||
'phone' => '+123456789'
|
'number' => '+123456789'
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ class GraphQLUsersTest extends Scope
|
||||||
$this->assertIsArray($user['body']['data']);
|
$this->assertIsArray($user['body']['data']);
|
||||||
$this->assertArrayNotHasKey('errors', $user['body']);
|
$this->assertArrayNotHasKey('errors', $user['body']);
|
||||||
$this->assertIsArray($user['body']['data']['usersUpdatePhone']);
|
$this->assertIsArray($user['body']['data']['usersUpdatePhone']);
|
||||||
$this->assertEquals('+123456789', $user['body']['data']['usersUpdatePhone']['phone']);
|
$this->assertEquals('+123456789', $user['body']['data']['usersUpdatePhone']['number']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testUpdateUserPrefs()
|
public function testUpdateUserPrefs()
|
||||||
|
|
Loading…
Reference in a new issue