From: itheiss Date: Fri, 22 Mar 2013 09:08:53 +0000 (+0100) Subject: Extend test case for getDefaultEmailAddress() X-Git-Tag: v6.0.0alpha2~1010^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d00b2f610e71744b4f27348a43131516236d4f45;p=nextcloud-server.git Extend test case for getDefaultEmailAddress() see #2499 --- diff --git a/tests/lib/util.php b/tests/lib/util.php index b904c359807..c9b88271fb4 100644 --- a/tests/lib/util.php +++ b/tests/lib/util.php @@ -46,5 +46,10 @@ class Test_Util extends PHPUnit_Framework_TestCase { function testGetDefaultEmailAddress() { $email = \OCP\Util::getDefaultEmailAddress("no-reply"); $this->assertEquals('no-reply@localhost.localdomain', $email); + + 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'); } -} \ No newline at end of file +}