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

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-09-30 21:10:05 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-10-15 23:38:33 +0300
commitbe5965e3ae4ea1b8e1df028b83ea3533d1e3bd2f (patch)
treeb23c04c72db586c7dcf686203d8831e3ff591894 /tests
parentbc495aff638f532870575f8646fe4ad14375183c (diff)
Build CKEditor from source to disable more features
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/Controller/AccountsControllerTest.php14
-rw-r--r--tests/Db/MailAccountMapperTest.php1
-rw-r--r--tests/Db/MailAccountTest.php5
-rw-r--r--tests/Integration/Service/MailTransmissionIntegrationTest.php2
4 files changed, 19 insertions, 3 deletions
diff --git a/tests/Controller/AccountsControllerTest.php b/tests/Controller/AccountsControllerTest.php
index 93c283d4a..b5ef64b6a 100644
--- a/tests/Controller/AccountsControllerTest.php
+++ b/tests/Controller/AccountsControllerTest.php
@@ -426,7 +426,19 @@ class AccountsControllerTest extends TestCase {
->with($this->userId, $messageData, $replyData, null, null);
$expected = new JSONResponse();
- $resp = $this->controller->send(13, 'sub', 'bod', 'to@d.com', '', '', null, base64_encode($folderId), $messageId, [], null);
+ $resp = $this->controller->send(
+ 13,
+ 'sub',
+ 'bod',
+ 'to@d.com',
+ '',
+ '',
+ true,
+ null,
+ base64_encode($folderId),
+ $messageId,
+ [],
+ null);
$this->assertEquals($expected, $resp);
}
diff --git a/tests/Db/MailAccountMapperTest.php b/tests/Db/MailAccountMapperTest.php
index 0609579ab..2278bbe96 100644
--- a/tests/Db/MailAccountMapperTest.php
+++ b/tests/Db/MailAccountMapperTest.php
@@ -68,6 +68,7 @@ class MailAccountMapperTest extends TestCase {
$this->account->setOutboundPassword('xxxx');
$this->account->setOutboundSslMode('ssl');
$this->account->setUserId('user12345');
+ $this->account->setEditorMode('plaintext');
}
public function testFind(){
diff --git a/tests/Db/MailAccountTest.php b/tests/Db/MailAccountTest.php
index ba95921b3..3c6d01558 100644
--- a/tests/Db/MailAccountTest.php
+++ b/tests/Db/MailAccountTest.php
@@ -23,7 +23,7 @@ namespace OCA\Mail\Db;
use ChristophWurst\Nextcloud\Testing\TestCase;
-class TestMailAccount extends TestCase {
+class MailAccountTest extends TestCase {
public function testToAPI() {
$a = new MailAccount();
@@ -41,6 +41,7 @@ class TestMailAccount extends TestCase {
$a->setOutboundUser('spiderman');
$a->setOutboundPassword('xxxx');
$a->setOutboundSslMode('ssl');
+ $a->setEditorMode('html');
$this->assertEquals(array(
'accountId' => 12345,
@@ -55,6 +56,7 @@ class TestMailAccount extends TestCase {
'smtpUser' => 'spiderman',
'smtpSslMode' => 'ssl',
'signature' => null,
+ 'editorMode' => 'html',
), $a->toJson());
}
@@ -72,6 +74,7 @@ class TestMailAccount extends TestCase {
'smtpUser' => 'spiderman',
'smtpSslMode' => 'ssl',
'signature' => null,
+ 'editorMode' => null,
];
$a = new MailAccount($expected);
// TODO: fix inconsistency
diff --git a/tests/Integration/Service/MailTransmissionIntegrationTest.php b/tests/Integration/Service/MailTransmissionIntegrationTest.php
index 542be21de..e0176d1d3 100644
--- a/tests/Integration/Service/MailTransmissionIntegrationTest.php
+++ b/tests/Integration/Service/MailTransmissionIntegrationTest.php
@@ -193,7 +193,7 @@ class MailTransmissionIntegrationTest extends TestCase {
}
public function testSaveNewDraft() {
- $message = NewMessageData::fromRequest($this->account, 'recipient@domain.com', null, null, 'greetings', 'hello there', []);
+ $message = NewMessageData::fromRequest($this->account, 'recipient@domain.com', null, null, 'greetings', 'hello there', [], false);
$uid = $this->transmission->saveDraft($message);
// There should be a new mailbox …
$this->assertMailboxExists('Drafts');