aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/util.php')
-rw-r--r--tests/lib/util.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/util.php b/tests/lib/util.php
index 852caaeccc3..bfe68f5f680 100644
--- a/tests/lib/util.php
+++ b/tests/lib/util.php
@@ -88,6 +88,15 @@ class Test_Util extends PHPUnit_Framework_TestCase {
OC_Config::deleteKey('mail_domain');
}
+ function testGetConfiguredEmailAddressFromConfig() {
+ OC_Config::setValue('mail_domain', 'example.com');
+ OC_Config::setValue('mail_from_address', 'owncloud');
+ $email = \OCP\Util::getDefaultEmailAddress("no-reply");
+ $this->assertEquals('owncloud@example.com', $email);
+ OC_Config::deleteKey('mail_domain');
+ OC_Config::deleteKey('mail_from_address');
+ }
+
function testGetInstanceIdGeneratesValidId() {
OC_Config::deleteKey('instanceid');
$this->assertStringStartsWith('oc', OC_Util::getInstanceId());