summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-26 02:50:11 -0700
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-26 02:50:11 -0700
commitd49e8ffb5ed4be03f05b607d9b673e4543b94d21 (patch)
treecfa977851bc941f18becc0d876c161fdd116f062 /tests
parentd121180d46009dec1464d73bb0f769b0b62a00d9 (diff)
parentf0733b2cb53cc199d0bb7667b23dbdced449ac88 (diff)
downloadnextcloud-server-d49e8ffb5ed4be03f05b607d9b673e4543b94d21.tar.gz
nextcloud-server-d49e8ffb5ed4be03f05b607d9b673e4543b94d21.zip
Merge pull request #2568 from itheiss/master
Implement setting custom domainname for getDefaultEmailAddress
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/util.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/lib/util.php b/tests/lib/util.php
index b904c359807..1c9054264c9 100644
--- a/tests/lib/util.php
+++ b/tests/lib/util.php
@@ -47,4 +47,11 @@ class Test_Util extends PHPUnit_Framework_TestCase {
$email = \OCP\Util::getDefaultEmailAddress("no-reply");
$this->assertEquals('no-reply@localhost.localdomain', $email);
}
-} \ No newline at end of file
+
+ function testGetDefaultEmailAddressFromConfig() {
+ OC_Config::setValue('mail_domain', 'example.com');
+ $email = \OCP\Util::getDefaultEmailAddress("no-reply");
+ $this->assertEquals('no-reply@example.com', $email);
+ OC_Config::deleteKey('mail_domain');
+ }
+}