aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-12-15 06:56:07 +0100
committerGitHub <noreply@github.com>2023-12-15 06:56:07 +0100
commitd6de7bf21b5696105a81eeca65c292ae556d0e61 (patch)
tree9076880bf5b74f301f2b3b7fac2919f87c68ec08 /apps/dav
parent29763f0c16cd8a97db460e3fa70c238b19427aa4 (diff)
parent226134a19533bf30aa3d9db30752045386a6741b (diff)
downloadnextcloud-server-d6de7bf21b5696105a81eeca65c292ae556d0e61.tar.gz
nextcloud-server-d6de7bf21b5696105a81eeca65c292ae556d0e61.zip
Merge pull request #42209 from nextcloud/bugfix/noid/comments-meta-data
feat(comments): Add a meta data column for comments
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/tests/unit/Comments/CommentsNodeTest.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/dav/tests/unit/Comments/CommentsNodeTest.php b/apps/dav/tests/unit/Comments/CommentsNodeTest.php
index 15c207eafbd..f9a6e872b80 100644
--- a/apps/dav/tests/unit/Comments/CommentsNodeTest.php
+++ b/apps/dav/tests/unit/Comments/CommentsNodeTest.php
@@ -405,6 +405,11 @@ class CommentsNodeTest extends \Test\TestCase {
$ns . 'referenceId' => 'ref',
$ns . 'isUnread' => null,
$ns . 'reactions' => [],
+ $ns . 'metaData' => [
+ 'last_edited_at' => 1702553770,
+ 'last_edited_by_id' => 'charly',
+ 'last_edited_by_type' => 'user',
+ ],
$ns . 'expireDate' => new \DateTime('2016-01-12 19:00:00'),
];
@@ -476,6 +481,10 @@ class CommentsNodeTest extends \Test\TestCase {
->willReturn($expected[$ns . 'referenceId']);
$this->comment->expects($this->once())
+ ->method('getMetaData')
+ ->willReturn($expected[$ns . 'metaData']);
+
+ $this->comment->expects($this->once())
->method('getExpireDate')
->willReturn($expected[$ns . 'expireDate']);
@@ -494,7 +503,7 @@ class CommentsNodeTest extends \Test\TestCase {
$properties = $this->node->getProperties(null);
foreach ($properties as $name => $value) {
- $this->assertArrayHasKey($name, $expected);
+ $this->assertArrayHasKey($name, $expected, 'Key not found in the list of $expected');
$this->assertSame($expected[$name], $value);
unset($expected[$name]);
}