summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2016-01-26 13:16:14 +0100
committerArthur Schiwon <blizzz@owncloud.com>2016-01-26 13:16:14 +0100
commite5ba28f9343b3f9fdcf5d2e53c6d1f085f20639d (patch)
treee0e6cc289c17dca1ed8b85871617434859047b02 /apps
parent8afa39682c2b637b35fd3722a5aa7e443878fb65 (diff)
downloadnextcloud-server-e5ba28f9343b3f9fdcf5d2e53c6d1f085f20639d.tar.gz
nextcloud-server-e5ba28f9343b3f9fdcf5d2e53c6d1f085f20639d.zip
adjust unit tests
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/tests/unit/comments/commentnode.php7
-rw-r--r--apps/dav/tests/unit/comments/commentsplugin.php4
-rw-r--r--apps/dav/tests/unit/comments/entitytypecollection.php2
3 files changed, 6 insertions, 7 deletions
diff --git a/apps/dav/tests/unit/comments/commentnode.php b/apps/dav/tests/unit/comments/commentnode.php
index b224bee9098..e1498459ce8 100644
--- a/apps/dav/tests/unit/comments/commentnode.php
+++ b/apps/dav/tests/unit/comments/commentnode.php
@@ -71,12 +71,7 @@ class CommentsNode extends \Test\TestCase {
}
public function testGetLastModified() {
- $dateTime = new \DateTime('2016-01-10 18:48:00');
- $this->comment->expects($this->once())
- ->method('getCreationDateTime')
- ->will($this->returnValue($dateTime));
-
- $this->assertSame($this->node->getLastModified(), $dateTime->getTimestamp());
+ $this->assertSame($this->node->getLastModified(), null);
}
public function testUpdateComment() {
diff --git a/apps/dav/tests/unit/comments/commentsplugin.php b/apps/dav/tests/unit/comments/commentsplugin.php
index 5fcccab90b7..391c79d156a 100644
--- a/apps/dav/tests/unit/comments/commentsplugin.php
+++ b/apps/dav/tests/unit/comments/commentsplugin.php
@@ -23,6 +23,7 @@ namespace OCA\DAV\Tests\Unit\Comments;
use OC\Comments\Comment;
use OCA\DAV\Comments\CommentsPlugin as CommentsPluginImplementation;
+use Sabre\DAV\Exception\NotFound;
class CommentsPlugin extends \Test\TestCase {
/** @var \Sabre\DAV\Server */
@@ -146,6 +147,9 @@ class CommentsPlugin extends \Test\TestCase {
$this->plugin->httpPost($request, $response);
}
+ /**
+ * @expectedException \Sabre\DAV\Exception\NotFound
+ */
public function testCreateCommentInvalidObject() {
$commentData = [
'actorType' => 'users',
diff --git a/apps/dav/tests/unit/comments/entitytypecollection.php b/apps/dav/tests/unit/comments/entitytypecollection.php
index 72e90a57134..e8a88c4e2cb 100644
--- a/apps/dav/tests/unit/comments/entitytypecollection.php
+++ b/apps/dav/tests/unit/comments/entitytypecollection.php
@@ -74,7 +74,7 @@ class EntityTypeCollection extends \Test\TestCase {
}
/**
- * @expectedException \Sabre\DAV\Exception\Forbidden
+ * @expectedException \Sabre\DAV\Exception\NotFound
*/
public function testGetChildException() {
$this->folder->expects($this->once())