summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/tests/Controller/GroupsControllerTest.php
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2018-05-25 15:54:47 +0200
committerGitHub <noreply@github.com>2018-05-25 15:54:47 +0200
commit760b28ba4c7d4a9b6126aa4063238c2959eb263e (patch)
tree3671b2c23d7a9316a3b66e0e23d7062a65a30464 /apps/provisioning_api/tests/Controller/GroupsControllerTest.php
parentd4a0af7e5ec0d0e97dda2d826574779dab82260c (diff)
parent4644841ba67e1e1f606011b51148303f59be3960 (diff)
downloadnextcloud-server-760b28ba4c7d4a9b6126aa4063238c2959eb263e.tar.gz
nextcloud-server-760b28ba4c7d4a9b6126aa4063238c2959eb263e.zip
Merge pull request #9488 from nextcloud/disabled-users-fix
Added disabled count per groups & fixed disabled users query
Diffstat (limited to 'apps/provisioning_api/tests/Controller/GroupsControllerTest.php')
-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());
}