summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-09-25 15:05:23 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-09-25 15:05:23 +0200
commit4077ed6ddbd11a4013284ea1a15455a68827f16d (patch)
tree9b60b53aa754293ff5d89c64b6702d748cf8b8bb /apps
parent333d3eda993a2af26639cb73d60a79fb9322826b (diff)
downloadnextcloud-server-4077ed6ddbd11a4013284ea1a15455a68827f16d.tar.gz
nextcloud-server-4077ed6ddbd11a4013284ea1a15455a68827f16d.zip
add some additional assertions to the tests
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/api.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
index 02adff7dfaa..475f203471e 100644
--- a/apps/files_sharing/tests/api.php
+++ b/apps/files_sharing/tests/api.php
@@ -220,14 +220,23 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
$fileInfo = $this->view->getFileInfo($this->filename);
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
+ $result = \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
- \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK,
+ // share was successful?
+ $this->assertTrue($result);
+
+ $result = \OCP\Share::shareItem('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK,
null, 1);
+ // share was successful?
+ $this->assertTrue(is_string($result));
+
$items = \OCP\Share::getItemShared('file', null);
+ // make sure that we found a link share and a user share
+ $this->assertEquals(count($items), 2);
+
$linkShare = null;
$userShare = null;