Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-01-17 15:48:43 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-01-17 15:48:43 +0300
commit3784fa2074ba411860e2986b7b324f4c93ca899e (patch)
tree0ec02576de2213cb86abbdd16b05e0ab348e82a3 /tests
parentc121610d5a42b8a30a328c0a2f9704fb20d4c369 (diff)
comments should compile mentions also if done by author
it is used by clients for formatting reasons, there is no reason not format the author if her handle is included in the comment body. It is unrelated to sending out notifications. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Comments/CommentTest.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php
index 10ec4bae7d5..6f67356ccae 100644
--- a/tests/lib/Comments/CommentTest.php
+++ b/tests/lib/Comments/CommentTest.php
@@ -8,6 +8,9 @@ use Test\TestCase;
class CommentTest extends TestCase {
+ /**
+ * @throws \OCP\Comments\IllegalIDChangeException
+ */
public function testSettersValidInput() {
$comment = new Comment();
@@ -58,6 +61,9 @@ class CommentTest extends TestCase {
$comment->setId('c17');
}
+ /**
+ * @throws \OCP\Comments\IllegalIDChangeException
+ */
public function testResetId() {
$comment = new Comment();
$comment->setId('c23');
@@ -133,7 +139,7 @@ class CommentTest extends TestCase {
'@alice @bob look look, a duplication @alice test @bob!', ['alice', 'bob']
],
[
- '@alice is the author, but notify @bob!', ['bob'], 'alice'
+ '@alice is the author, notify @bob, nevertheless mention her!', ['alice', 'bob'], 'alice'
],
[
'@foobar and @barfoo you should know, @foo@bar.com is valid' .
@@ -159,7 +165,6 @@ class CommentTest extends TestCase {
$uid = array_shift($expectedUids);
$this->assertSame('user', $mention['type']);
$this->assertSame($uid, $mention['id']);
- $this->assertNotSame($author, $mention['id']);
}
$this->assertEmpty($mentions);
$this->assertEmpty($expectedUids);