diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-07 10:49:34 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-07 15:46:46 +0100 |
commit | 96be3a4a7d6995ccbae53d0d4597f1cb9e4fba2f (patch) | |
tree | 1104412404919e9a707c93ccc09333d6ee019242 /tests | |
parent | 16c057e076073c3507e3329eba05224c2ecff1de (diff) | |
download | nextcloud-server-96be3a4a7d6995ccbae53d0d4597f1cb9e4fba2f.tar.gz nextcloud-server-96be3a4a7d6995ccbae53d0d4597f1cb9e4fba2f.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 c74fe406db1..27a728cbab7 100644 --- a/tests/lib/share/MailNotificationsTest.php +++ b/tests/lib/share/MailNotificationsTest.php @@ -119,7 +119,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(); @@ -130,7 +144,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'); @@ -175,7 +189,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() { |