|
|
|
|
@ -2117,6 +2117,20 @@ class UsersControllerTest extends TestCase {
|
|
|
|
|
$this->api->removeFromGroup('TargetUser', null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException \OCP\AppFramework\OCS\OCSException
|
|
|
|
|
* @expectedExceptionCode 101
|
|
|
|
|
*/
|
|
|
|
|
public function testRemoveFromGroupWithEmptyTargetGroup() {
|
|
|
|
|
$loggedInUser = $this->getMockBuilder('\OCP\IUser')->disableOriginalConstructor()->getMock();
|
|
|
|
|
$this->userSession
|
|
|
|
|
->expects($this->once())
|
|
|
|
|
->method('getUser')
|
|
|
|
|
->will($this->returnValue($loggedInUser));
|
|
|
|
|
|
|
|
|
|
$this->api->removeFromGroup('TargetUser', '');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException \OCP\AppFramework\OCS\OCSException
|
|
|
|
|
* @expectedExceptionCode 102
|
|
|
|
|
|