summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-05-20 10:16:07 +0200
committerThomas Tanghus <thomas@tanghus.net>2013-05-20 10:16:07 +0200
commitb1bb899867b787f024c94ae26907b857e203d59c (patch)
tree4335797b38053f80be2a7e75c81a1b63a3ae2580 /tests/lib
parent6609de28d832262e8f72fb19e5f0343cd021cca3 (diff)
downloadnextcloud-server-b1bb899867b787f024c94ae26907b857e203d59c.tar.gz
nextcloud-server-b1bb899867b787f024c94ae26907b857e203d59c.zip
Add rename() method to OC_VCategories.
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/vcategories.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/vcategories.php b/tests/lib/vcategories.php
index e79dd49870c..a8af6ae9f7a 100644
--- a/tests/lib/vcategories.php
+++ b/tests/lib/vcategories.php
@@ -81,6 +81,16 @@ class Test_VCategories extends PHPUnit_Framework_TestCase {
}
+ public function testrenameCategory() {
+ $defcategories = array('Friends', 'Family', 'Wrok', 'Other');
+ $catmgr = new OC_VCategories($this->objectType, $this->user, $defcategories);
+
+ $this->assertTrue($catmgr->rename('Wrok', 'Work'));
+ $this->assertTrue($catmgr->hasCategory('Work'));
+ $this->assertFalse($catmgr->hasCategory('Wrok'));
+
+ }
+
public function testAddToCategory() {
$objids = array(1, 2, 3, 4, 5, 6, 7, 8, 9);