diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-07 10:49:34 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-07 10:49:34 +0100 |
commit | 5b87413792416beec851be7ecfcaaf2d5bb933c4 (patch) | |
tree | c8b69c59e0eec31e4f8bd45c6fa34d0c49fe5bf4 /tests | |
parent | 884946276e13e7949cb2a5a46fd29d342ff386d4 (diff) | |
download | nextcloud-server-5b87413792416beec851be7ecfcaaf2d5bb933c4.tar.gz nextcloud-server-5b87413792416beec851be7ecfcaaf2d5bb933c4.zip |
Allow sending a share email to multiple users
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/share/MailNotificationsTest.php | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/lib/share/MailNotificationsTest.php b/tests/lib/share/MailNotificationsTest.php index 2124a8bf13b..0706b97233b 100644 --- a/tests/lib/share/MailNotificationsTest.php +++ b/tests/lib/share/MailNotificationsTest.php @@ -123,7 +123,21 @@ class MailNotificationsTest extends \Test\TestCase { $this->assertSame([], $mailNotifications->sendLinkShareMail('lukas@owncloud.com', 'MyFile', 'https://owncloud.com/file/?foo=bar', 3600)); } - public function testSendLinkShareMailWithReplyTo() { + public function dataSendLinkShareMailWithReplyTo() { + return [ + ['lukas@owncloud.com nickvergessen@owncloud.com'], + ['lukas@owncloud.com,nickvergessen@owncloud.com'], + ['lukas@owncloud.com, nickvergessen@owncloud.com'], + ['lukas@owncloud.com;nickvergessen@owncloud.com'], + ['lukas@owncloud.com; nickvergessen@owncloud.com'], + ]; + } + + /** + * @dataProvider dataSendLinkShareMailWithReplyTo + * @param string $to + */ + public function testSendLinkShareMailWithReplyTo($to) { $message = $this->getMockBuilder('\OC\Mail\Message') ->disableOriginalConstructor()->getMock(); @@ -134,7 +148,7 @@ class MailNotificationsTest extends \Test\TestCase { $message ->expects($this->once()) ->method('setTo') - ->with(['lukas@owncloud.com']); + ->with(['lukas@owncloud.com', 'nickvergessen@owncloud.com']); $message ->expects($this->once()) ->method('setHtmlBody'); @@ -167,7 +181,7 @@ class MailNotificationsTest extends \Test\TestCase { $this->logger, $this->defaults ); - $this->assertSame([], $mailNotifications->sendLinkShareMail('lukas@owncloud.com', 'MyFile', 'https://owncloud.com/file/?foo=bar', 3600)); + $this->assertSame([], $mailNotifications->sendLinkShareMail($to, 'MyFile', 'https://owncloud.com/file/?foo=bar', 3600)); } public function testSendLinkShareMailException() { |