summaryrefslogtreecommitdiffstats
path: root/tests/bl/FeedBlTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-20 23:00:39 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-21 00:31:41 +0100
commitef2af010a63bfcf511cdf648e9358a3956d97739 (patch)
treed88ebe96b8cd1e798d567bf5a3e5b0a541cbed30 /tests/bl/FeedBlTest.php
parent6dab27a668b33f91efe5905d0bcb83d4b212ee86 (diff)
finished folder businesslayer
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());
+ }
+
}