summaryrefslogtreecommitdiffstats
path: root/tests/bl/FeedBlTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bl/FeedBlTest.php')
-rw-r--r--tests/bl/FeedBlTest.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/bl/FeedBlTest.php b/tests/bl/FeedBlTest.php
index 01301b91f..dca99c682 100644
--- a/tests/bl/FeedBlTest.php
+++ b/tests/bl/FeedBlTest.php
@@ -47,7 +47,7 @@ class FolderBlTest extends \OCA\AppFramework\Utility\TestUtility {
}
- function testGetAll(){
+ function testFindAll(){
$userId = 'jack';
$return = 'hi';
$this->folderMapper->expects($this->once())
@@ -55,7 +55,7 @@ class FolderBlTest extends \OCA\AppFramework\Utility\TestUtility {
->with($this->equalTo($userId))
->will($this->returnValue($return));
- $result = $this->folderBl->getAll($userId);
+ $result = $this->folderBl->findAll($userId);
$this->assertEquals($return, $result);
}
@@ -95,4 +95,23 @@ class FolderBlTest extends \OCA\AppFramework\Utility\TestUtility {
}
+
+ public function testRename(){
+ $folder = new Folder();
+ $folder->setName('jooohn');
+
+ $this->folderMapper->expects($this->once())
+ ->method('find')
+ ->with($this->equalTo(3))
+ ->will($this->returnValue($folder));
+
+ $this->folderMapper->expects($this->once())
+ ->method('update')
+ ->with($this->equalTo($folder));
+
+ $this->folderBl->rename(3, 'bogus', '');
+
+ $this->assertEquals('bogus', $folder->getName());
+ }
+
}