summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
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');
+ }
+}