summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-05-17 12:48:26 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-05-24 17:52:15 +0200
commit97af7566e4f9e703d096e4fae3ab8c60304627aa (patch)
treee72cfead9f3dc4b39ac6f9c066ae71c73d5ef8d7 /apps/provisioning_api
parent10c135ca3414544a92febbc45b39d358c8383757 (diff)
downloadnextcloud-server-97af7566e4f9e703d096e4fae3ab8c60304627aa.tar.gz
nextcloud-server-97af7566e4f9e703d096e4fae3ab8c60304627aa.zip
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r--apps/provisioning_api/tests/Controller/GroupsControllerTest.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
index 44b440a40b2..115c9c7ba46 100644
--- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
@@ -101,6 +101,12 @@ class GroupsControllerTest extends \Test\TestCase {
$group
->method('getDisplayName')
->willReturn($gid.'-name');
+ $group
+ ->method('count')
+ ->willReturn(123);
+ $group
+ ->method('countDisabled')
+ ->willReturn(11);
return $group;
}
@@ -205,8 +211,18 @@ class GroupsControllerTest extends \Test\TestCase {
$result = $this->api->getGroupsDetails($search, $limit, $offset);
$this->assertEquals(['groups' => [
- Array('id' => 'group1', 'displayname' => 'group1-name'),
- Array('id' => 'group2', 'displayname' => 'group2-name')
+ Array(
+ 'id' => 'group1',
+ 'displayname' => 'group1-name',
+ 'usercount' => 123,
+ 'disabled' => 11
+ ),
+ Array(
+ 'id' => 'group2',
+ 'displayname' => 'group2-name',
+ 'usercount' => 123,
+ 'disabled' => 11
+ )
]], $result->getData());
}