summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-01-28 15:52:59 +0100
committerArthur Schiwon <blizzz@owncloud.com>2015-01-28 15:52:59 +0100
commit31de757514ce6b23587161c6e1b15016df11e02f (patch)
tree24ef0247519f19bb94230c5eab0e1a092c43cf97 /apps/user_ldap/tests
parent323af55b500dcd0cd1e1ce61408a6a416075ef07 (diff)
downloadnextcloud-server-31de757514ce6b23587161c6e1b15016df11e02f.tar.gz
nextcloud-server-31de757514ce6b23587161c6e1b15016df11e02f.zip
fix counting of users in primary group
Diffstat (limited to 'apps/user_ldap/tests')
-rw-r--r--apps/user_ldap/tests/group_ldap.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php
index efd7f803f3b..44f0f82c2f7 100644
--- a/apps/user_ldap/tests/group_ldap.php
+++ b/apps/user_ldap/tests/group_ldap.php
@@ -76,10 +76,15 @@ class Test_Group_Ldap extends \Test\TestCase {
->method('readAttribute')
->will($this->returnValue(array('u11', 'u22', 'u33', 'u34')));
+ // for primary groups
+ $access->expects($this->once())
+ ->method('countUsers')
+ ->will($this->returnValue(2));
+
$groupBackend = new GroupLDAP($access);
$users = $groupBackend->countUsersInGroup('group');
- $this->assertSame(4, $users);
+ $this->assertSame(6, $users);
}
public function testCountWithSearchString() {