[provisioning api] Test for correct displayname
This commit is contained in:
parent
4bffe393e9
commit
2148120883
2
3rdparty
2
3rdparty
|
@ -1 +1 @@
|
|||
Subproject commit c45d817921543d2f0562ac4f3be61404b1d4a35e
|
||||
Subproject commit b94f7d38f6e13825fd34c7113827d3c369a689ad
|
|
@ -130,7 +130,7 @@ class Users {
|
|||
$data = self::fillStorageInfo($userId, $data);
|
||||
$data['enabled'] = $this->config->getUserValue($userId, 'core', 'enabled', 'true');
|
||||
$data['email'] = $this->config->getUserValue($userId, 'settings', 'email');
|
||||
$data['displayname'] = $this->userManager->get($parameters['userid']);
|
||||
$data['displayname'] = $this->userManager->get($parameters['userid'])->getDisplayName();
|
||||
|
||||
// Return the appropriate data
|
||||
$responseData = array();
|
||||
|
|
|
@ -162,12 +162,15 @@ class UsersTest extends TestCase {
|
|||
|
||||
public function testGetUserOnSelf() {
|
||||
$user = $this->generateUsers();
|
||||
$user->setDisplayName('foobar');
|
||||
$this->userSession->setUser($user);
|
||||
$params['userid'] = $user->getUID();
|
||||
$result = $this->api->getUser($params);
|
||||
$this->assertInstanceOf('OC_OCS_Result', $result);
|
||||
$this->assertTrue($result->succeeded());
|
||||
$data = $result->getData();
|
||||
|
||||
$this->assertEquals('foobar', $data['displayname']);
|
||||
}
|
||||
|
||||
public function testGetUserOnNonExistingUser() {
|
||||
|
|
Loading…
Reference in New Issue