summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-12-11 15:16:28 +0100
committerGitHub <noreply@github.com>2017-12-11 15:16:28 +0100
commit7c39711798354cd99dd9d8740e8c97f0d0f0fecc (patch)
treec43fb58d43dbfd3b087921ea52d627513b272f56 /tests
parent5b20600da9d4156251683da6532ef0ce4762481b (diff)
parentcce4c285dbfd6957f50112b234b3545ebcceac54 (diff)
downloadnextcloud-server-7c39711798354cd99dd9d8740e8c97f0d0f0fecc.tar.gz
nextcloud-server-7c39711798354cd99dd9d8740e8c97f0d0f0fecc.zip
Merge pull request #7427 from nextcloud/fix-white-color-in-emails
Fix email buttons for white theme
Diffstat (limited to 'tests')
-rw-r--r--tests/Settings/Mailer/NewUserMailHelperTest.php12
-rw-r--r--tests/data/emails/new-account-email-custom.html2
-rw-r--r--tests/data/emails/new-account-email-single-button.html2
-rw-r--r--tests/data/emails/new-account-email.html2
-rw-r--r--tests/lib/Mail/EMailTemplateTest.php16
5 files changed, 29 insertions, 5 deletions
diff --git a/tests/Settings/Mailer/NewUserMailHelperTest.php b/tests/Settings/Mailer/NewUserMailHelperTest.php
index f05a963e537..84553cc9007 100644
--- a/tests/Settings/Mailer/NewUserMailHelperTest.php
+++ b/tests/Settings/Mailer/NewUserMailHelperTest.php
@@ -157,6 +157,10 @@ class NewUserMailHelperTest extends TestCase {
->expects($this->any())
->method('getName')
->willReturn('TestCloud');
+ $this->defaults
+ ->expects($this->any())
+ ->method('getTextColorPrimary')
+ ->willReturn('#ffffff');
$expectedHtmlBody = <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -281,7 +285,7 @@ class NewUserMailHelperTest extends TestCase {
<table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%">
<tr style="padding:0;text-align:left;vertical-align:top">
<td style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;background:;border:0 solid ;border-collapse:collapse!important;color:#fefefe;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;text-align:left;vertical-align:top;word-wrap:break-word">
- <a href="https://example.com/resetPassword/MySuperLongSecureRandomToken" style="Margin:0;border:0 solid ;border-radius:2px;color:#fefefe;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;text-decoration:none">Set your password</a>
+ <a href="https://example.com/resetPassword/MySuperLongSecureRandomToken" style="Margin:0;border:0 solid ;border-radius:2px;color:#ffffff;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;outline:1px solid #ffffff;text-decoration:none">Set your password</a>
</td>
</tr>
</table>
@@ -390,6 +394,10 @@ EOF;
->expects($this->any())
->method('getName')
->willReturn('TestCloud');
+ $this->defaults
+ ->expects($this->any())
+ ->method('getTextColorPrimary')
+ ->willReturn('#ffffff');
$expectedHtmlBody = <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -514,7 +522,7 @@ EOF;
<table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%">
<tr style="padding:0;text-align:left;vertical-align:top">
<td style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;background:;border:0 solid ;border-collapse:collapse!important;color:#fefefe;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;text-align:left;vertical-align:top;word-wrap:break-word">
- <a href="https://example.com/" style="Margin:0;border:0 solid ;border-radius:2px;color:#fefefe;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;text-decoration:none">Go to TestCloud</a>
+ <a href="https://example.com/" style="Margin:0;border:0 solid ;border-radius:2px;color:#ffffff;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;outline:1px solid #ffffff;text-decoration:none">Go to TestCloud</a>
</td>
</tr>
</table>
diff --git a/tests/data/emails/new-account-email-custom.html b/tests/data/emails/new-account-email-custom.html
index 9d35a7f3515..601aa0b63d4 100644
--- a/tests/data/emails/new-account-email-custom.html
+++ b/tests/data/emails/new-account-email-custom.html
@@ -120,7 +120,7 @@
<table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%">
<tr style="padding:0;text-align:left;vertical-align:top">
<td style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;background:#0082c9;border:0 solid #0082c9;border-collapse:collapse!important;color:#fefefe;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;text-align:left;vertical-align:top;word-wrap:break-word">
- <a href="https://example.org/resetPassword/123" style="Margin:0;border:0 solid #0082c9;border-radius:2px;color:#fefefe;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;text-decoration:none">Set your password</a>
+ <a href="https://example.org/resetPassword/123" style="Margin:0;border:0 solid #0082c9;border-radius:2px;color:#ffffff;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;outline:1px solid #ffffff;text-decoration:none">Set your password</a>
</td>
</tr>
</table>
diff --git a/tests/data/emails/new-account-email-single-button.html b/tests/data/emails/new-account-email-single-button.html
index 3746d5d2cbb..db8ab868682 100644
--- a/tests/data/emails/new-account-email-single-button.html
+++ b/tests/data/emails/new-account-email-single-button.html
@@ -120,7 +120,7 @@
<table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%">
<tr style="padding:0;text-align:left;vertical-align:top">
<td style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;background:#0082c9;border:0 solid #0082c9;border-collapse:collapse!important;color:#fefefe;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;text-align:left;vertical-align:top;word-wrap:break-word">
- <a href="https://example.org/resetPassword/123" style="Margin:0;border:0 solid #0082c9;border-radius:2px;color:#fefefe;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;text-decoration:none">Set your password</a>
+ <a href="https://example.org/resetPassword/123" style="Margin:0;border:0 solid #0082c9;border-radius:2px;color:#ffffff;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;outline:1px solid #ffffff;text-decoration:none">Set your password</a>
</td>
</tr>
</table>
diff --git a/tests/data/emails/new-account-email.html b/tests/data/emails/new-account-email.html
index d33cb540c38..f7ffbb8abf6 100644
--- a/tests/data/emails/new-account-email.html
+++ b/tests/data/emails/new-account-email.html
@@ -120,7 +120,7 @@
<table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%">
<tr style="padding:0;text-align:left;vertical-align:top">
<td style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;background:#0082c9;border:0 solid #0082c9;border-collapse:collapse!important;color:#fefefe;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;text-align:left;vertical-align:top;word-wrap:break-word">
- <a href="https://example.org/resetPassword/123" style="Margin:0;border:0 solid #0082c9;border-radius:2px;color:#fefefe;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;text-decoration:none">Set your password</a>
+ <a href="https://example.org/resetPassword/123" style="Margin:0;border:0 solid #0082c9;border-radius:2px;color:#ffffff;display:inline-block;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:regular;line-height:1.3;margin:0;padding:10px 25px 10px 25px;text-align:left;outline:1px solid #ffffff;text-decoration:none">Set your password</a>
</td>
</tr>
</table>
diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php
index 339cd95defc..d4687c44b06 100644
--- a/tests/lib/Mail/EMailTemplateTest.php
+++ b/tests/lib/Mail/EMailTemplateTest.php
@@ -68,6 +68,10 @@ class EMailTemplateTest extends TestCase {
->expects($this->any())
->method('getName')
->willReturn('TestCloud');
+ $this->defaults
+ ->expects($this->any())
+ ->method('getTextColorPrimary')
+ ->willReturn('#ffffff');
$this->urlGenerator
->expects($this->once())
->method('getAbsoluteURL')
@@ -109,6 +113,10 @@ class EMailTemplateTest extends TestCase {
->expects($this->any())
->method('getLogo')
->willReturn('/img/logo-mail-header.png');
+ $this->defaults
+ ->expects($this->any())
+ ->method('getTextColorPrimary')
+ ->willReturn('#ffffff');
$this->urlGenerator
->expects($this->once())
->method('getAbsoluteURL')
@@ -148,6 +156,10 @@ class EMailTemplateTest extends TestCase {
->expects($this->any())
->method('getLogo')
->willReturn('/img/logo-mail-header.png');
+ $this->defaults
+ ->expects($this->any())
+ ->method('getTextColorPrimary')
+ ->willReturn('#ffffff');
$this->urlGenerator
->expects($this->once())
->method('getAbsoluteURL')
@@ -189,6 +201,10 @@ class EMailTemplateTest extends TestCase {
->expects($this->any())
->method('getLogo')
->willReturn('/img/logo-mail-header.png');
+ $this->defaults
+ ->expects($this->any())
+ ->method('getTextColorPrimary')
+ ->willReturn('#ffffff');
$this->urlGenerator
->expects($this->once())
->method('getAbsoluteURL')