summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/lib/group/manager.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/group/manager.php b/tests/lib/group/manager.php
index 18f78c21a12..8a1db4592a4 100644
--- a/tests/lib/group/manager.php
+++ b/tests/lib/group/manager.php
@@ -64,6 +64,22 @@ class Manager extends \PHPUnit_Framework_TestCase {
$this->assertNull($manager->get('group1'));
}
+ public function testGetDeleted() {
+ $backend = new \OC_Group_Dummy();
+ $backend->createGroup('group1');
+
+ /**
+ * @var \OC\User\Manager $userManager
+ */
+ $userManager = $this->getMock('\OC\User\Manager');
+ $manager = new \OC\Group\Manager($userManager);
+ $manager->addBackend($backend);
+
+ $group = $manager->get('group1');
+ $group->delete();
+ $this->assertNull($manager->get('group1'));
+ }
+
public function testGetMultipleBackends() {
/**
* @var \PHPUnit_Framework_MockObject_MockObject | \OC_Group_Backend $backend1