summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-07-10 02:00:14 +0200
committerRobin Appelman <icewind@owncloud.com>2013-07-10 02:00:14 +0200
commit2d9be541eacf2dbde43a57ee14e2a0eba9597a47 (patch)
tree7d228dc63452fe654c77d6dc3640397f67dd478c /tests
parentcc2818ba130d417a762b1a9ef492928378a2c595 (diff)
downloadnextcloud-server-2d9be541eacf2dbde43a57ee14e2a0eba9597a47.tar.gz
nextcloud-server-2d9be541eacf2dbde43a57ee14e2a0eba9597a47.zip
add test case for getting group after deleting it
Diffstat (limited to 'tests')
-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