Skip to content
Snippets Groups Projects
Commit c565a7b0 authored by Thomas Müller's avatar Thomas Müller
Browse files

Fix failing unit test :skull:

parent 9ec2850c
No related branches found
No related tags found
No related merge requests found
......@@ -237,7 +237,7 @@ class OC_Util {
$newValue = json_encode($excludedGroups);
$config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue);
}
$usersGroups = $groupManager->getUserGroups($user);
$usersGroups = $groupManager->getUserGroupIds($user);
if (!empty($usersGroups)) {
$remainingGroups = array_diff($usersGroups, $excludedGroups);
// if the user is only in groups which are disabled for sharing then
......
......@@ -306,24 +306,10 @@ class Test_Util extends \Test\TestCase {
$groupManager
->expects($this->at(0))
->method('getUserGroups')
->method('getUserGroupIds')
->with($user)
->will($this->returnValue($membership));
// $uid = "user1";
// \OC_User::setUserId($uid);
//
// \OC_User::createUser($uid, "passwd");
//
// foreach ($groups as $group) {
// \OC_Group::createGroup($group);
// }
//
// foreach ($membership as $group) {
// \OC_Group::addToGroup($uid, $group);
// }
//
$result = \OC_Util::isSharingDisabledForUser($config, $groupManager, $user);
$this->assertSame($expected, $result);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment